This document contains effect size calculation for the Campbell systematic review ‘Group-based community interventions to support the social reintegration of marginalised adults with mental illness’ (Dalgaard, Flensborg Jensen, Bengtsen, Krassel, & Vembye, 2022).
# To retrieved the function used to cluster bias correct effect sizes
# devtools::install_github("MikkelVembye/VIVECampbell")
library(tidyverse)
#library(dplyr)
library(readxl)
library(writexl)
library(purrr)
library(VIVECampbell)
library(metafor)
ICC_005 <- 0.05
ICC_01 <- 0.1
ICC_02 <- 0.2
ppcor_imp <- 0.5
R2_imp <- 0
grp_size_imp <- 8
dat_string <- if (isTRUE(getOption('knitr.in.progress'))) "GAF_res.rds" else "ES calc/GAF_res.rds"
# Loading data used to calculate population-based effect size estimates
GAF_pop_res <- readRDS(dat_string)
To calculate pretest-adjusted effect sizes, we first estimate pre-post and pre-followup correlations from the reported results in “Treatment effect” section (p. 7)
# _fu = followup
Acarturk_text_res <-
tibble(
outcome = rep(c("HSCL-25", "PCL-5", "PSYCHLOPS"), each = 2),
timing = rep(c("Posttest", "Followup"), 3),
N = rep(c(41, 44, 19), c(2, 2, 2)), # Obtained from df(t)/2
m_pre = rep(c(2.34, 1.77, 4.06), each = 2),
sd_pre = rep(c(0.60, 0.86, 0.76), each = 2),
m_post = c(
2.15, 2.11, # HSCL-25
1.43, 1.19, # PCL-5
3.82, 3.45 # PSYCHLOPS
),
sd_post = c(
0.60, 0.59,
0.79, 0.78,
0.86, 1.32
),
paired_t = c(
2.43, 2.83,
2.61, 4.45,
1.01, 2.57
)
) |>
mutate(
ppcor = ((sd_pre^2*paired_t^2 + sd_post^2*paired_t^2) - (m_post - m_pre)^2 * N)/
(2*sd_pre*sd_post*paired_t^2),
.by = c(outcome, timing)
); Acarturk_text_res
## # A tibble: 6 × 9
## outcome timing N m_pre sd_pre m_post sd_post paired_t ppcor
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 HSCL-25 Posttest 41 2.34 0.6 2.15 0.6 2.43 0.6519
## 2 HSCL-25 Followup 41 2.34 0.6 2.11 0.59 2.83 0.6176
## 3 PCL-5 Posttest 44 1.77 0.86 1.43 0.79 2.61 0.4541
## 4 PCL-5 Followup 44 1.77 0.86 1.19 0.78 4.45 0.4476
## 5 PSYCHLOPS Posttest 19 4.06 0.76 3.82 0.86 1.01 0.1869
## 6 PSYCHLOPS Followup 19 4.06 0.76 3.45 1.32 2.57 0.6228
Entering data from Table 2 (p. 7)
Acarturk2022 <-
tibble(
outcome = rep(c("HSCL-25", "PCL-5", "PSYCHLOPS"), each = 4),
timing = rep(c("Posttest", "Followup"), each = 2, n_distinct(outcome)),
group = rep(c("gPM+", "Control"), n_distinct(outcome)*2),
N = rep(c(24, 22), n_distinct(outcome)*2),
m_pre = c(
rep(c(2.37, 2.31), 2), # HSCL-25
rep(c(1.84, 1.70), 2), # PCL-5
rep(c(4.20, 3.92), 2) # PSYCHLOPS
),
sd_pre = c(
rep(c(0.58, 0.64), 2),
rep(c(0.88, 0.86), 2),
rep(c(0.68, 0.84), 2)
),
m_post = c(
2.01, 2.28, 2.07, 2.14,
1.27, 1.59, 1.12, 1.26,
3.82, 3.82, 3.67, 3.23
),
sd_post = c(
0.59, 0.58, 0.52, 0.43,
0.70, 0.86, 0.85, 0.70,
1.00, 0.63, 1.32, 1.63
),
es_paper = rep(c(
0.48, 0.12,
0.40, 0.18,
0, -0.30
),
each = 2
),
pval_paper = rep(c(
0.109, 0.698,
0.185, 0.553,
0.996, 0.319
),
each = 2
)
); Acarturk2022
## # A tibble: 12 × 10
## outcome timing group N m_pre sd_pre m_post sd_post es_paper
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 HSCL-25 Posttest gPM+ 24 2.37 0.58 2.01 0.59 0.48
## 2 HSCL-25 Posttest Control 22 2.31 0.64 2.28 0.58 0.48
## 3 HSCL-25 Followup gPM+ 24 2.37 0.58 2.07 0.52 0.12
## 4 HSCL-25 Followup Control 22 2.31 0.64 2.14 0.43 0.12
## 5 PCL-5 Posttest gPM+ 24 1.84 0.88 1.27 0.7 0.4
## 6 PCL-5 Posttest Control 22 1.7 0.86 1.59 0.86 0.4
## 7 PCL-5 Followup gPM+ 24 1.84 0.88 1.12 0.85 0.18
## 8 PCL-5 Followup Control 22 1.7 0.86 1.26 0.7 0.18
## 9 PSYCHLOPS Posttest gPM+ 24 4.2 0.68 3.82 1 0
## 10 PSYCHLOPS Posttest Control 22 3.92 0.84 3.82 0.63 0
## 11 PSYCHLOPS Followup gPM+ 24 4.2 0.68 3.67 1.32 -0.3
## 12 PSYCHLOPS Followup Control 22 3.92 0.84 3.23 1.63 -0.3
## pval_paper
## <dbl>
## 1 0.109
## 2 0.109
## 3 0.698
## 4 0.698
## 5 0.185
## 6 0.185
## 7 0.553
## 8 0.553
## 9 0.996
## 10 0.996
## 11 0.319
## 12 0.319
wide_format_Acarturk2022 <-
function(data, filter_value, trt_name, ctr_name){
filter_func <-
function(data, filter_value, trt_name, ctr_name){
dat <- data |> dplyr::filter(timing == filter_value)
dat |>
dplyr::mutate(group = case_match(group, trt_name ~ "t", ctr_name ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
}
purrr::pmap_dfr(
list(filter_value), ~
filter_func(data = data, filter_value = .x,
trt_name = trt_name, ctr_name = ctr_name)) |>
arrange(outcome)
}
Acarturk2022_wide <-
wide_format_Acarturk2022(
data = Acarturk2022,
filter_value = c("Posttest", "Followup"),
trt_name = "gPM+",
ctr_name = "Control"
) |>
mutate(
es_paper = es_paper_t,
es_paper_type = "d effect size from a mixed-model analysis",
pval_paper = pval_paper_t
) |>
select(-c(es_paper_t:pval_paper_c))
Effect size calculation and cluster bias adjustment
eta_acarturk_sqrt <- VIVECampbell::eta_1armcluster(
N_total = 46, Nc = 22, avg_grp_size = 10, ICC = ICC_01,
sqrt = TRUE
)
Acarturk2022_es <-
Acarturk2022 |>
mutate(
ppcor = rep(Acarturk_text_res$ppcor, each = 2)
) |>
summarise(
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Acarturk et al. 2022",
main_es_method = "Raw diff-in-diffs",
ppcor = ppcor[1],
ppcor_method = "Calculated from study",
N_t = N[1],
N_c = N[2],
N_total = N_t + N_c,
N_start_t = N_t,
N_start_c = N_c,
df_ind = N_total,
n_covariates = 1,
es_paper = es_paper[1],
pval_paper = pval_paper[1],
tval_paper = qnorm(pval_paper/2, lower.tail = FALSE),
se_es_paper = es_paper/tval_paper,
se_es_paper = if_else(se_es_paper == 0, sqrt(sum(1/N)) * eta_acarturk_sqrt, se_es_paper),
var_es_paper = se_es_paper^2,
sd_pool = sqrt( sum((N-1)*sd_post^2)/ (N_total-2) ),
m_diff_post = (m_post[1] - m_post[2]) * -1,
# Difference in differences measures
m_diff_t = (m_post[1] - m_pre[1]) * -1,
m_diff_c = (m_post[2] - m_pre[2]) * -1,
DD = m_diff_t - m_diff_c,
d_post = m_diff_post/sd_pool,
vd_post = sum(1/N) + d_post^2/(2*df_ind),
Wd_post = sum(1/N),
d_DD = DD/sd_pool,
vd_DD = 2*(1-ppcor) * sum(1/N) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * sum(1/N),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = sum(1/N) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * sum(1/N) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD,
.by = c(outcome, timing)
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# " eight to ten participants per group" (p. 1)
avg_cl_size = 10,
avg_cl_type = "From study (p. 1)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
gt_post = g_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = vgt_post:Wgt_post
)
) |>
ungroup()
Acarturk2022_est <-
left_join(Acarturk2022_wide, Acarturk2022_es) |>
relocate(study) |>
mutate(
vary_id = paste0(outcome, "/", timing),
analysis_plan = case_when(
outcome == "HSCL-25" ~ "All mental health outcomes",
outcome == "PCL-5" ~ "All mental health outcomes",
outcome == "PSYCHLOPS" ~ "Wellbeing and Quality of Life",
TRUE ~ NA_character_ # Fallback in case of unexpected outcomes
)
)
Acarturk2022_est
## # A tibble: 6 × 69
## study outcome timing N_t N_c m_pre_t m_pre_c sd_pre_t
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Acarturk et al. 2022 HSCL-25 Posttest 24 22 2.37 2.31 0.58
## 2 Acarturk et al. 2022 HSCL-25 Followup 24 22 2.37 2.31 0.58
## 3 Acarturk et al. 2022 PCL-5 Posttest 24 22 1.84 1.7 0.88
## 4 Acarturk et al. 2022 PCL-5 Followup 24 22 1.84 1.7 0.88
## 5 Acarturk et al. 2022 PSYCHLOPS Posttest 24 22 4.2 3.92 0.68
## 6 Acarturk et al. 2022 PSYCHLOPS Followup 24 22 4.2 3.92 0.68
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c es_paper
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.64 2.01 2.28 0.59 0.58 0.48
## 2 0.64 2.07 2.14 0.52 0.43 0.12
## 3 0.86 1.27 1.59 0.7 0.86 0.4
## 4 0.86 1.12 1.26 0.85 0.7 0.18
## 5 0.84 3.82 3.82 1 0.63 0
## 6 0.84 3.67 3.23 1.32 1.63 -0.3
## es_paper_type pval_paper effect_size
## <chr> <dbl> <chr>
## 1 d effect size from a mixed-model analysis 0.109 SMD
## 2 d effect size from a mixed-model analysis 0.698 SMD
## 3 d effect size from a mixed-model analysis 0.185 SMD
## 4 d effect size from a mixed-model analysis 0.553 SMD
## 5 d effect size from a mixed-model analysis 0.996 SMD
## 6 d effect size from a mixed-model analysis 0.319 SMD
## sd_used main_es_method ppcor ppcor_method N_total
## <chr> <chr> <dbl> <chr> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.6519 Calculated from study 46
## 2 Pooled posttest SD Raw diff-in-diffs 0.6176 Calculated from study 46
## 3 Pooled posttest SD Raw diff-in-diffs 0.4541 Calculated from study 46
## 4 Pooled posttest SD Raw diff-in-diffs 0.4476 Calculated from study 46
## 5 Pooled posttest SD Raw diff-in-diffs 0.1869 Calculated from study 46
## 6 Pooled posttest SD Raw diff-in-diffs 0.6228 Calculated from study 46
## N_start_t N_start_c df_ind n_covariates tval_paper se_es_paper var_es_paper
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 24 22 46 1 1.603 0.2995 0.08970
## 2 24 22 46 1 0.3880 0.3093 0.09564
## 3 24 22 46 1 1.326 0.3018 0.09106
## 4 24 22 46 1 0.5933 0.3034 0.09205
## 5 24 22 46 1 0.005013 0.3465 0.1201
## 6 24 22 46 1 0.9965 -0.3010 0.09063
## sd_pool m_diff_post m_diff_t m_diff_c DD d_post vd_post Wd_post d_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5852 0.27 0.3600 0.03000 0.33 0.4613 0.08943 0.08712 0.5639
## 2 0.4792 0.07000 0.3000 0.17 0.1300 0.1461 0.08735 0.08712 0.2713
## 3 0.7805 0.32 0.57 0.1100 0.46 0.4100 0.08895 0.08712 0.5894
## 4 0.7820 0.1400 0.72 0.44 0.28 0.1790 0.08747 0.08712 0.3581
## 5 0.8439 0 0.3800 0.1000 0.2800 0 0.08712 0.08712 0.3318
## 6 1.476 -0.44 0.53 0.69 -0.1600 -0.2981 0.08809 0.08712 -0.1084
## vd_DD Wd_DD J g_post vg_post Wg_post g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.06412 0.06066 0.9836 0.4538 0.08936 0.08712 0.5546 0.06400 0.06066
## 2 0.06742 0.06662 0.9836 0.1437 0.08735 0.08712 0.2669 0.06740 0.06662
## 3 0.09890 0.09512 0.9836 0.4033 0.08889 0.08712 0.5797 0.09877 0.09512
## 4 0.09764 0.09625 0.9836 0.1761 0.08746 0.08712 0.3522 0.09759 0.09625
## 5 0.1429 0.1417 0.9836 0 0.08712 0.08712 0.3264 0.1428 0.1417
## 6 0.06585 0.06572 0.9836 -0.2932 0.08806 0.08712 -0.1066 0.06585 0.06572
## avg_cl_size avg_cl_type icc icc_type gamma_sqrt df_adj omega gt_DD
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 10 From study (p. 1) 0.1 Imputed 0.965 42.49 0.9822 0.5345
## 2 10 From study (p. 1) 0.1 Imputed 0.965 42.49 0.9822 0.2572
## 3 10 From study (p. 1) 0.1 Imputed 0.965 42.49 0.9822 0.5587
## 4 10 From study (p. 1) 0.1 Imputed 0.965 42.49 0.9822 0.3394
## 5 10 From study (p. 1) 0.1 Imputed 0.965 42.49 0.9822 0.3145
## 6 10 From study (p. 1) 0.1 Imputed 0.965 42.49 0.9822 -0.1027
## vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.08695 0.08359 0.2817 0.02353 42.49 42.49 1 eta
## 2 0.09259 0.09181 0.1300 0.02353 42.49 42.49 1 eta
## 3 0.1347 0.1311 0.2356 0.02353 42.49 42.49 1 eta
## 4 0.1340 0.1326 0.1427 0.02353 42.49 42.49 1 eta
## 5 0.1964 0.1952 0.1091 0.02353 42.49 42.49 1 eta
## 6 0.09069 0.09057 -0.05236 0.02353 42.49 42.49 1 eta
## adj_value_DD gt_post vgt_post Wgt_post vary_id
## <dbl> <dbl> <dbl> <dbl> <chr>
## 1 1.378 0.4379 0.1223 0.1201 HSCL-25/Posttest
## 2 1.378 0.1387 0.1203 0.1201 HSCL-25/Followup
## 3 1.378 0.3892 0.1218 0.1201 PCL-5/Posttest
## 4 1.378 0.1699 0.1204 0.1201 PCL-5/Followup
## 5 1.378 0 0.1201 0.1201 PSYCHLOPS/Posttest
## 6 1.378 -0.2829 0.1210 0.1201 PSYCHLOPS/Followup
## analysis_plan
## <chr>
## 1 All mental health outcomes
## 2 All mental health outcomes
## 3 All mental health outcomes
## 4 All mental health outcomes
## 5 Wellbeing and Quality of Life
## 6 Wellbeing and Quality of Life
Entering data from Table 3 (p. 495).
Barbic2009 <- tibble(
outcome = rep(c("Hope Index", "Empowerment Scale", "Quality of Life", "Recovery Assessment"), each = 2),
group = rep(c("Recovery Workbook", "Control"), dplyr::n_distinct(outcome)),
N = rep(c(16, 17), dplyr::n_distinct(outcome)),
N_start = rep(c(16,17), 4),
m_pre = c(
37.13, 36.00,
55.93, 63.88,
20.34, 20.70,
163.75, 156.41),
sd_pre = c(
6.53, 5.36,
6.91, 6.91,
5.01, 4.13,
22.60, 14.22),
m_post = c(
38.93, 35.06,
14.93, 61.96, # The post-measurement seems flawed from therefore we exclude it from the analysis
21.60, 22.27,
168.81, 149.11),
sd_post = c(
5.34, 6.21,
10.43, 7.33,
3.35, 4.91,
20.11, 22.09)
); Barbic2009
## # A tibble: 8 × 8
## outcome group N N_start m_pre sd_pre m_post
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Hope Index Recovery Workbook 16 16 37.13 6.53 38.93
## 2 Hope Index Control 17 17 36 5.36 35.06
## 3 Empowerment Scale Recovery Workbook 16 16 55.93 6.91 14.93
## 4 Empowerment Scale Control 17 17 63.88 6.91 61.96
## 5 Quality of Life Recovery Workbook 16 16 20.34 5.01 21.6
## 6 Quality of Life Control 17 17 20.7 4.13 22.27
## 7 Recovery Assessment Recovery Workbook 16 16 163.8 22.6 168.8
## 8 Recovery Assessment Control 17 17 156.4 14.22 149.1
## sd_post
## <dbl>
## 1 5.34
## 2 6.21
## 3 10.43
## 4 7.33
## 5 3.35
## 6 4.91
## 7 20.11
## 8 22.09
Barbic2009_wide <-
Barbic2009 |>
mutate(group = case_match(group, "Recovery Workbook" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
# Based on the degrees of freedom value reported in Barbic et al. (2009),
# we cannot replicate the report F_values. Therefore, we do not use any F_values for
# for the effect size correlation
p_val_f = c(.05, .21, .96, .02),
df1 = 1,
df2 = 31,
F_val = qf(p_val_f, df1 = df1, df2 = df2, lower.tail = FALSE)
)
Effect size calculating, including cluster-bias correction
Barbic2009_est <-
Barbic2009_wide |>
mutate(
analysis_plan = rep(
c("Hope, Empowerment & Self-efficacy", "Wellbeing and Quality of Life",
"Hope, Empowerment & Self-efficacy"),
c(2, 1, 1))
) |>
rowwise() |>
mutate(
F_val = if_else(outcome == "Empowerment Scale", 14.93, F_val), # Retrieved from (p. 495)
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Barbic et al. 2009",
main_es_method = "Raw diff-in-diffs",
ppcor = ppcor_imp,
ppcor_method = "Imputed",
# R2 = NA_real_,
# R2_calc_method = "Not relevant",
N_total = N_t + N_c,
df_ind = N_total,
# Calculate d post
m_post = if_else(outcome != "Empowerment Scale", m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Account for the fact that some outcomes are on different scales
m_diff_t = if_else(outcome != "Empowerment Scale", m_post_t - m_pre_t, (m_post_t - m_pre_t) * -1),
m_diff_c = if_else(outcome != "Empowerment Scale", m_post_c - m_pre_c, (m_post_c - m_pre_c) * -1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
# Average cluster size in treatment group
# "12 weekly two-hour group sessions with seven to nine participants." (p. 493)
avg_cl_size = 8,
avg_cl_type = "From study (p. 493)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup() |>
relocate(N_total, .after = N_c); Barbic2009_est
## # A tibble: 4 × 65
## outcome N_t N_c N_total N_start_t N_start_c m_pre_t m_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Hope Index 16 17 33 16 17 37.13 36
## 2 Empowerment Scale 16 17 33 16 17 55.93 63.88
## 3 Quality of Life 16 17 33 16 17 20.34 20.7
## 4 Recovery Assessment 16 17 33 16 17 163.8 156.4
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c p_val_f df1 df2
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6.53 5.36 38.93 35.06 5.34 6.21 0.05 1 31
## 2 6.91 6.91 14.93 61.96 10.43 7.33 0.21 1 31
## 3 5.01 4.13 21.6 22.27 3.35 4.91 0.96 1 31
## 4 22.6 14.22 168.8 149.1 20.11 22.09 0.02 1 31
## F_val analysis_plan effect_size sd_used
## <dbl> <chr> <chr> <chr>
## 1 4.160 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 2 14.93 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 3 0.002556 Wellbeing and Quality of Life SMD Pooled posttest SD
## 4 6.016 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## study main_es_method ppcor ppcor_method df_ind m_post sd_pool
## <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 Barbic et al. 2009 Raw diff-in-diffs 0.5 Imputed 33 3.87 5.805
## 2 Barbic et al. 2009 Raw diff-in-diffs 0.5 Imputed 33 47.03 8.965
## 3 Barbic et al. 2009 Raw diff-in-diffs 0.5 Imputed 33 -0.6700 4.228
## 4 Barbic et al. 2009 Raw diff-in-diffs 0.5 Imputed 33 19.7 21.16
## d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.6666 0.1281 0.1213 0.9771 0.6514 0.1278 0.1213 1.800 -0.9400
## 2 5.246 0.5383 0.1213 0.9771 5.126 0.5194 0.1213 41 1.920
## 3 -0.1585 0.1217 0.1213 0.9771 -0.1549 0.1217 0.1213 1.260 1.57
## 4 0.9312 0.1345 0.1213 0.9771 0.9099 0.1339 0.1213 5.06 -7.300
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.4720 0.1247 0.1213 0.4612 0.1245 0.1213 8 From study (p. 493)
## 2 4.359 0.4092 0.1213 4.259 0.3962 0.1213 8 From study (p. 493)
## 3 -0.07333 0.1214 0.1213 -0.07165 0.1214 0.1213 8 From study (p. 493)
## 4 0.5843 0.1265 0.1213 0.5709 0.1263 0.1213 8 From study (p. 493)
## icc icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1 Imputed 1 0.962 30.29 0.9750 0.6253 0.1656 0.1592
## 2 0.1 Imputed 1 0.962 30.29 0.9750 4.921 0.5589 0.1592
## 3 0.1 Imputed 1 0.962 30.29 0.9750 -0.1487 0.1595 0.1592
## 4 0.1 Imputed 1 0.962 30.29 0.9750 0.8735 0.1718 0.1592
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.4427 0.1624 0.1592 0.2009 0.03301 30.29 30.29 1 eta
## 2 4.089 0.4352 0.1592 1.540 0.03301 30.29 30.29 1 eta
## 3 -0.06878 0.1593 0.1592 -0.03132 0.03301 30.29 30.29 1 eta
## 4 0.5480 0.1641 0.1592 0.2483 0.03301 30.29 30.29 1 eta
## adj_value_DD vary_id
## <dbl> <chr>
## 1 1.312 Hope Index
## 2 1.312 Empowerment Scale
## 3 1.312 Quality of Life
## 4 1.312 Recovery Assessment
Entering data from Table 3 and 4 (p. 1032). Recovery Assessment Scale Scores are retrieved from the text on page 1032 reported under Table 3. In our analysis, we do not distinguish between different types of work as done in the paper. We, therefore, amalgamate all work categories. We coded the control group as the treatment group because the control is the group-based treatment, which is of our main concern.
# _t = Work choice
Bond2015_continious <-
tibble(
outcome = c("Recovery Assessment Scale", "Days hospitalized"),
N_t = 43,
N_c = c(42, 41),
N_start_t = 44,
N_start_c = 43,
m_post_t = c(4.14, 4.93),
sd_post_t = c(0.49, 7.59),
m_post_c = c(4.14, 10.44),
sd_post_c = c(0.57, 23.07),
analysis_plan = c("Hope, Empowerment & Self-efficacy", "Psychiatric hospitalization"),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Bond et al. 2015",
main_es_method = "Posttest es",
ppcor_method = "Posttest only",
N_total = N_t + N_c,
df_ind = N_total,
# Calculate d post
m_post = if_else(outcome != "Days hospitalized", m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post
) |>
rowwise() |>
mutate(
# Cluster bias correction
# Average cluster size in treatment group
# "Classes were scheduled weekly at two conveniently located sites" (p. 1029)
# Assuming two class in the Work Choice group is 44/2 = 22
avg_cl_size = 22,
avg_cl_type = "Guessed from study",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
n_covariates = 0,
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = -c(var_term1_post, n_covariates_post)
),
vary_id = outcome
)
Bond2015_binary <-
tibble(
outcome = c("Employment", "Risk of Psychiatric Hospitalization"),
N_t = c(43, 42), # See note a in Table for sample size of Table 4 (i.e., 42, 40, respectively)
N_c = c(42, 40),
N_start_t = 44,
N_start_c = 43,
A = c(13, 12),
B = c(30, 31),
C = c(20, 11),
D = c(22, 30),
analysis_plan = c("Employment", "Psychiatric hospitalization"),
effect_size = "OR",
sd_used = "Not relevant",
study = "Bond et al. 2015",
main_es_method = "Raw events",
n_covariates = 0,
N_total = N_t + N_c,
p_t = A/N_t,
p_c = C/N_c,
RD = p_t - p_c,
vRD = (A*B)/N_t^3 + (C*D)/N_c^3,
# Average cluster size in treatment group
# "Classes were scheduled weekly at two conveniently located sites" (p. 1029)
# Assuming two class in the Work Choice group is 44/2 = 22
avg_cl_size = 22,
avg_cl_type = "Guessed from study",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
# OR calculation and cluster bias adjustment as recommended by Cochrane
VIVECampbell::OR_calc(
A = A, B = B, C = C, D = D,
ICC = icc, avg_cl_size = avg_cl_size, n_cluster_arms = 1
),
vary_id = outcome
)
Bond2015_est <- bind_rows(Bond2015_continious, Bond2015_binary)
Bond2015_est
## # A tibble: 4 × 57
## # Rowwise:
## outcome N_t N_c N_start_t N_start_c m_post_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Recovery Assessment Scale 43 42 44 43 4.14
## 2 Days hospitalized 43 41 44 43 4.93
## 3 Employment 43 42 44 43 NA
## 4 Risk of Psychiatric Hospitalization 42 40 44 43 NA
## sd_post_t m_post_c sd_post_c analysis_plan effect_size
## <dbl> <dbl> <dbl> <chr> <chr>
## 1 0.49 4.14 0.57 Hope, Empowerment & Self-efficacy SMD
## 2 7.59 10.44 23.07 Psychiatric hospitalization SMD
## 3 NA NA NA Employment OR
## 4 NA NA NA Psychiatric hospitalization OR
## sd_used study main_es_method ppcor_method N_total
## <chr> <chr> <chr> <chr> <dbl>
## 1 Pooled posttest SD Bond et al. 2015 Posttest es Posttest only 85
## 2 Pooled posttest SD Bond et al. 2015 Posttest es Posttest only 84
## 3 Not relevant Bond et al. 2015 Raw events <NA> 85
## 4 Not relevant Bond et al. 2015 Raw events <NA> 82
## df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 85 0 0.5310 0 0.04707 0.04707 0.9912 0 0.04707
## 2 84 5.51 17.00 0.3240 0.04827 0.04765 0.9910 0.3211 0.04826
## 3 NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA
## Wg_post avg_cl_size avg_cl_type icc icc_type gamma_sqrt n_covariates
## <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.04707 22 Guessed from study 0.1 Imputed 0.962 0
## 2 0.04765 22 Guessed from study 0.1 Imputed 0.962 0
## 3 NA 22 Guessed from study 0.1 Imputed NA 0
## 4 NA 22 Guessed from study 0.1 Imputed NA 0
## df_adj omega gt_post vgt_post Wgt_post hg_post vhg_post h_post df_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 80.12 0.9906 0 0.09352 0.09352 0 0.01282 77.99 77.99
## 2 79.12 0.9905 0.3088 0.09467 0.09405 0.1146 0.01299 77 77
## 3 NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA
## adj_fct_post adj_value_post vary_id A B
## <chr> <dbl> <chr> <dbl> <dbl>
## 1 eta 1.987 Recovery Assessment Scale NA NA
## 2 eta 1.974 Days hospitalized NA NA
## 3 <NA> NA Employment 13 30
## 4 <NA> NA Risk of Psychiatric Hospitalization 12 31
## C D p_t p_c RD vRD OR ln_OR vln_OR DE
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 NA NA NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA NA NA
## 3 20 22 0.3023 0.4762 -0.1739 0.01084 0.4767 -0.7409 0.2057 1.987
## 4 11 30 0.2857 0.275 0.01071 0.01018 1.056 0.05422 0.2398 1.974
## vln_OR_C
## <dbl>
## 1 NA
## 2 NA
## 3 0.4088
## 4 0.4734
Bækkelund2022 <- tibble(
group = rep(c("Intervention", #Intervention group
"Control"), #Control group
each = 1, 4),
outcome = rep(c("GAF-S", # Global Assesment of Function - Split version
"SCL-90 R"), # Symptom Checklist 90 Revised
each = 2, 2),
timing = rep(c("post", "6m"), each = 4),
N = rep(c(
29, 30,
29, 30),
each = 1, 2),
N_start = N,
m_pre = rep(c(
41.7, 40.9,
1.8, 1.9),
each = 1,2),
sd_pre = rep(c(
5.7, 8.2,
0.7, 0.9),
each = 1,2),
m_post = c(
# 6 months
43.9, 44.2,
1.7, 1.9,
# 36 months
48.4, 45.7,
1.7, 1.9),
sd_post = c(
# 6 months
6.3, 8.7,
0.8, 0.9,
# 36 months
6.3, 4.2,
0.9, 1.0),
#_rm = repeated measure
d_rm = c(
0.4, 0.4,
0.1, .0,
1.1, 0.7,
0.1, .0 # Was reported as 0.4 but we can infer from the Table that this might have been a reporting mistake
),
# To calculated the pre-posttest correlation, we need the standard deviation of
# the mean differences (sd_diff). As can be seen from page 6. We can obtain
# sd_diff from the reported within-group effect sizes as follows
sd_diff = abs(m_post - m_pre)/d_rm,
# The group individual pre-posttest correlation can be obtained as follows.
# Note that we are not able to obtained correlations from d_rm = 0. This only
# concerns SCL90 pre-posttest effect sizes for the control group. Hereto,
#
r = (sd_pre^2 + sd_post^2 - sd_diff^2)/(2*sd_pre*sd_post)
) |>
mutate(
# Here we assume that the pre-post correlation is equal among groups
r = if_else(is.na(r), mean(r, na.rm = TRUE), r),
.by = c(outcome, timing)
) |>
mutate(
# To estiamte the average pre-posttest correlation
z = 0.5 * log( (1+r)/(1-r) ),
v = 1/(N-3),
w = 1/v
); Bækkelund2022
## # A tibble: 8 × 15
## group outcome timing N N_start m_pre sd_pre m_post sd_post d_rm
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention GAF-S post 29 29 41.7 5.7 43.9 6.3 0.4
## 2 Control GAF-S post 30 30 40.9 8.2 44.2 8.7 0.4
## 3 Intervention SCL-90 R post 29 29 1.8 0.7 1.7 0.8 0.1
## 4 Control SCL-90 R post 30 30 1.9 0.9 1.9 0.9 0
## 5 Intervention GAF-S 6m 29 29 41.7 5.7 48.4 6.3 1.1
## 6 Control GAF-S 6m 30 30 40.9 8.2 45.7 4.2 0.7
## 7 Intervention SCL-90 R 6m 29 29 1.8 0.7 1.7 0.9 0.1
## 8 Control SCL-90 R 6m 30 30 1.9 0.9 1.9 1 0
## sd_diff r z v w
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.500 0.5838 0.6682 0.03846 26
## 2 8.250 0.5247 0.5828 0.03704 27
## 3 1.000 0.1161 0.1166 0.03846 26
## 4 NaN 0.1161 0.1166 0.03704 27
## 5 6.091 0.4885 0.5340 0.03846 26
## 6 6.857 0.5496 0.6179 0.03704 27
## 7 1.000 0.2381 0.2428 0.03846 26
## 8 NaN 0.2381 0.2428 0.03704 27
# Making the tibble into wideformat in order to estimate effect sizes
Bækkelund2022_wide <-
Bækkelund2022 |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
# Effect size calculating
Bækkelund2022_est <-
Bækkelund2022_wide |>
mutate(
study = "Bækkelund et al. 2022",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
analysis_plan = case_when(
str_detect(outcome, "GAF-S") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "SCL-90 R") ~ "All mental health outcomes"),
main_es_method = "diff-in-diffs",
mean_z = (w_t*z_t + w_c*z_c)/(w_t + w_c),
ppcor = (exp(2*mean_z)-1)/(exp(2*mean_z)+1),
ppcor_method = "Calculated from study results",
m_diff_t = m_post_t - m_pre_t,
m_diff_c = m_post_c - m_pre_c,
#MHV DID scorerne skal også omvendes lige som post scorer :)
# SCL-90 R lower scores are beneficial why these is reverted
mean_diff = if_else(outcome != "GAF-S", (m_diff_t - m_diff_c)*-1,
m_diff_t - m_diff_c),
# SCL-90 R lower scores are beneficial why these is reverted
m_post = if_else(outcome != "GAF-S", (m_post_t - m_post_c)*-1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
N_total = N_t + N_c,
df_ind = N_total, # frihedsgrader svarer til den samlede stikprøvestørrelse
d_post = m_post/sd_pool, # Cohens Post D - posttest baseret effektstørrelse
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind), # varians af effekstørrelsen
Wd_post = (1/N_t + 1/N_c), # Det store variansled
d_DD = (mean_diff/sd_pool), #Cohens d
vd_DD = (1/N_t + 1/N_c) * 2*(1-ppcor) + d_DD^2/(2*df_ind), # skaber falsk korrelation, hvorfor vi beregner det store variansled
Wd_DD = (1/N_t + 1/N_c) * 2*(1-ppcor), # det store variansled
J = 1 - 3/(4*df_ind-1), # her bruger vi J som er en korrigeringsfaktor som vi kan bruge til at beregne Hedges' g (fra d til g)
g_post = J * (m_post/sd_pool),
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = (1/N_t + 1/N_c),
g_DD = J * (mean_diff/sd_pool), # her beregner vi Difference in difference effektstørrelse som er Mikkels foretrukne - baseline korrigeret effekstørrelse
vg_DD = (1/N_t + 1/N_c) * 2*(1-ppcor) + g_DD^2/(2*df_ind), # variansen af den baseline adjusted effekstørrelse
Wg_DD = Wd_DD,
.by = outcome
) |>
rowwise() |>
mutate(
# "each group was led by two therapists and had nine participants." (p. 4)
avg_cl_size = 9,
avg_cl_type = "Obtained from article (p. 4)",
# Laver variabel med den imputere ICC værdi
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc, sqrt = TRUE
),
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
gt_DD_pop = if_else(
str_detect(outcome, "GAF"),
omega * ((m_diff_t - m_diff_c)/GAF_pop_res$sd_population_GAF) * gamma_sqrt,
NA_real_
),
# Calculated from Eq. 28 (Fitzgerald & Tipton, 2024)
vgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD) + g_DD^2/(2*GAF_pop_res$df_pop),
NA_real_
),
Wgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD),
NA_real_
),
vary_id = paste(outcome, timing, sep = "/")
); Bækkelund2022_est
## # A tibble: 4 × 79
## # Rowwise:
## outcome timing N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 GAF-S post 29 30 29 30 41.7 40.9 5.7
## 2 SCL-90 R post 29 30 29 30 1.8 1.9 0.7
## 3 GAF-S 6m 29 30 29 30 41.7 40.9 5.7
## 4 SCL-90 R 6m 29 30 29 30 1.8 1.9 0.7
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c d_rm_t d_rm_c sd_diff_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 8.2 43.9 44.2 6.3 8.7 0.4 0.4 5.500
## 2 0.9 1.7 1.9 0.8 0.9 0.1 0 1.000
## 3 8.2 48.4 45.7 6.3 4.2 1.1 0.7 6.091
## 4 0.9 1.7 1.9 0.9 1 0.1 0 1.000
## sd_diff_c r_t r_c z_t z_c v_t v_c w_t w_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 8.250 0.5838 0.5247 0.6682 0.5828 0.03846 0.03704 26 27
## 2 NaN 0.1161 0.1161 0.1166 0.1166 0.03846 0.03704 26 27
## 3 6.857 0.4885 0.5496 0.5340 0.6179 0.03846 0.03704 26 27
## 4 NaN 0.2381 0.2381 0.2428 0.2428 0.03846 0.03704 26 27
## study effect_size sd_used
## <chr> <chr> <chr>
## 1 Bækkelund et al. 2022 SMD Pooled posttest SD
## 2 Bækkelund et al. 2022 SMD Pooled posttest SD
## 3 Bækkelund et al. 2022 SMD Pooled posttest SD
## 4 Bækkelund et al. 2022 SMD Pooled posttest SD
## analysis_plan main_es_method mean_z ppcor
## <chr> <chr> <dbl> <dbl>
## 1 Social functioning (degree of impairment) diff-in-diffs 0.6247 0.5544
## 2 All mental health outcomes diff-in-diffs 0.1166 0.1161
## 3 Social functioning (degree of impairment) diff-in-diffs 0.5767 0.5203
## 4 All mental health outcomes diff-in-diffs 0.2428 0.2381
## ppcor_method m_diff_t m_diff_c mean_diff m_post sd_pool
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Calculated from study results 2.200 3.300 -1.100 -0.3000 7.616
## 2 Calculated from study results -0.1000 0 0.1000 0.2 0.8523
## 3 Calculated from study results 6.700 4.800 1.900 2.700 5.336
## 4 Calculated from study results -0.1000 0 0.1000 0.2 0.9522
## N_total df_ind d_post vd_post Wd_post d_DD vd_DD Wd_DD J
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 59 59 -0.03939 0.06783 0.06782 -0.1444 0.06061 0.06044 0.9872
## 2 59 59 0.2346 0.06828 0.06782 0.1173 0.1200 0.1199 0.9872
## 3 59 59 0.5060 0.06999 0.06782 0.3561 0.06614 0.06506 0.9872
## 4 59 59 0.2100 0.06819 0.06782 0.1050 0.1034 0.1033 0.9872
## g_post vg_post Wg_post g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.03889 0.06783 0.06782 -0.1426 0.06061 0.06044 9
## 2 0.2317 0.06827 0.06782 0.1158 0.1200 0.1199 9
## 3 0.4995 0.06993 0.06782 0.3515 0.06611 0.06506 9
## 4 0.2074 0.06818 0.06782 0.1037 0.1034 0.1033 9
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj
## <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 Obtained from article (p. 4) 0.1 Imputed 1 0.967 55.09
## 2 Obtained from article (p. 4) 0.1 Imputed 1 0.967 55.09
## 3 Obtained from article (p. 4) 0.1 Imputed 1 0.967 55.09
## 4 Obtained from article (p. 4) 0.1 Imputed 1 0.967 55.09
## omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9863 -0.03757 0.09211 0.09209 -0.1378 0.08224 0.08207 -0.06476 0.01815
## 2 0.9863 0.2238 0.09255 0.09209 0.1119 0.1629 0.1628 0.03736 0.01815
## 3 0.9863 0.4826 0.09421 0.09209 0.3396 0.08940 0.08836 0.1536 0.01815
## 4 0.9863 0.2003 0.09246 0.09209 0.1002 0.1404 0.1403 0.03602 0.01815
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD gt_DD_pop vgt_DD_pop
## <dbl> <dbl> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 55.09 55.09 1 eta 1.358 -0.08283 0.07935
## 2 55.09 55.09 1 eta 1.358 NA NA
## 3 55.09 55.09 1 eta 1.358 0.1431 0.08566
## 4 55.09 55.09 1 eta 1.358 NA NA
## Wgt_DD_pop vary_id
## <dbl> <chr>
## 1 0.07931 GAF-S/post
## 2 NA SCL-90 R/post
## 3 0.08538 GAF-S/6m
## 4 NA SCL-90 R/6m
Data entered from Tables 2 and 3 (pp. 3342-45)
Cano_vindel2021 <- tibble(
analysis = rep(c("ITT", "Per-protocol"), each = 80),
group = rep(c("TAU", "TAU-GCBT"), each = 1,80),
outcome = rep(c("GAD-7", "PHQ-9", "PHQ15", "working_life_Function",
"Socal_life_Function", "Family_life_Function", "Physical_QoL",
"Psychological_QoL", "Social_QoL", "Environment_QoL"),
each = 8,2),
timing = rep(c("Post", "3m", "6m", "12m"), each = 2,20),
N = c(rep(c(534, 527), 40), # ITT
rep(c(316, 315, # per-protocol post-treatment
238, 273,# per-protocol 3 months
204, 229,# per-protocol 6 months
180, 208), 1,80) # per-protocol 12 months
),
N_start = rep(c(534,527), each = 80),
m_pre = c(
rep(c(12.1, 12.5), each = 1,4), # ITT GAD-7 Anxiety Baseline)
rep(c(13.5, 13.7), each = 1,4), # ITT PHQ9
rep(c(14, 14.3), each = 1,4), # ITT PHQ15
rep(c(3.5, 3.6), each = 1,4), # ITT working life
rep(c(4.6, 4.7), each = 1,4), # ITT social life
rep(c(4.6, 4.8), each = 1,4), # ITT family life
rep(c(22.4, 22.1), each = 1,4), # ITT Physical
rep(c(16.9, 16.9), each = 1,4), # ITT Psychological
rep(c(9.1, 9.1), each = 1,4), # ITT Social
rep(c(25.3, 25.7), each = 1,4), # ITT Environment
rep(c(12.1, 12.5), each = 1,4), # per-protocol GAD-7 Anxiety Baseline)
rep(c(13.5, 13.7), each = 1,4), # per-protocol GAD-7 PHQ9
rep(c(14, 14.3), each = 1,4), # per-protocol GAD-7 PHQ15
rep(c(3.5, 3.6), each = 1,4), # per-protocol GAD-7 working life
rep(c(4.6, 4.7), each = 1,4), # per-protocol GAD-7 social life
rep(c(4.6, 4.8), each = 1,4), # per-protocol GAD-7 family life
rep(c(22.4, 22.1), each = 1,4), # per-protocol GAD-7 Physical
rep(c(16.9, 16.9), each = 1,4), # per-protocol GAD-7 Psychological
rep(c(9.1, 9.1), each = 1,4), # per-protocol GAD-7 Social
rep(c(25.3, 25.7), each = 1,4) # per-protocol GAD-7 Environment
),
sd_pre = c(
rep(c(4.7, 4.6), each = 1,4), # ITT GAD-7 Standard deviation
rep(c(5.4, 5.3), each = 1,4), # ITT PHQ9
rep(c(4.8, 4.9),each = 1,4), # ITT PHQ15
rep(c(3.1, 3.2), each = 1,4), # ITT working life
rep(c(3, 3), each = 1,4), # ITT social life
rep(c(3.1, 3), each = 1,4), # ITT family life
rep(c(4.3, 4.3), each = 1,4), # ITT Physical
rep(c(3.8, 3.8), each = 1,4), # ITT Psychological
rep(c(2.4, 2.4), each = 1,4), # ITT Social
rep(c(4.5, 4.6), each = 1,4), # ITT Environment
rep(c(4.7, 4.6), each = 1,4), # per-protocol GAD-7 Standard deviation
rep(c(5.4, 5.3), each = 1,4), # per-protocol PHQ9
rep(c(4.8, 4.9),each = 1,4), # per-protocol PHQ15
rep(c(3.1, 3.2), each = 1,4), # per-protocol working life
rep(c(3, 3), each = 1,4), # per-protocol social life
rep(c(3.1, 3), each = 1,4), # per-protocol family life
rep(c(4.3, 4.3), each = 1,4), # per-protocol Physical
rep(c(3.8, 3.8), each = 1,4), # per-protocol Psychological
rep(c(2.4, 2.4), each = 1,4), # per-protocol Social
rep(c(4.5, 4.6), each = 1,4) # per-protocol Environment
),
m_post = c(
9.5, 6.8, # ITT GAD-7 Anxiety post-treatment
8.7, 7.3, # ITT GAD-7 Anxiety 3 months
8.6, 6.9, # ITT GAD-7 Anxiety 6 months
8.3, 6.6, # ITT GAD-7 Anxiety 12 months
10.8, 8.0, # ITT PHQ9 Depression post treatment
10.2, 8.4, # ITT PHQ9 Depression 3 months
9.8, 7.9, # ITT PHQ9 Depression 6 months
9.4, 7.8, # ITT PHQ9 Depression 12 months
11.7, 9.9, # ITT PHQ-15 post-treatment
11.4, 10.1,# ITT PHQ-15 3 months
11.1, 9.8, # ITT PHQ-15 6 months
10.7, 9.4, # ITT PHQ-15 12 months
3.0, 2.6, # ITT working life post-treatment
2.7, 2.4, # ITT Working life 3 months
2.7, 2.1, # ITT working life 6 months
3.1, 2.4, # ITT working life 12 months
4.1, 3.2, # ITT social life post-treatment
3.5, 3.2, # ITT social life 3 months
3.4, 2.7, # ITT social life 6 months
3.8, 2.9, # ITT social life 12 months
3.9, 3.1, # ITT Family life post-treatment
3.5, 3.1, # ITT Family life 3 months
3.6, 2.7, # ITT Family life 6 months
3.8, 2.8, # ITT Family life 12 months
23.2, 24.7, # ITT Physical post-treatment
23.5, 24.2, # ITT Physical 3 months
23.6, 24.3, # ITT Physical 6 months
24.2, 26.4, # ITT Physical12 months
17.7, 19.2, # ITT Psychological post-treatment
18.1, 18.9, # ITT Psychological 3 months
18.5, 19.1, # ITT Psychological 6 months
18.7, 20.8, # ITT Psychological 12 months
9.4, 9.8, # ITT Social post-treatment
9.5, 9.7, # ITT Social 3 months
9.5, 9.7, # ITT Social 6 months
9.7, 11.1, # ITT Social 12 months
25.7, 27.2, # ITT Environment post-treatment
26.1, 26.9, # ITT Environment 3 months
26.5, 27.1, # ITT Environment 6 months
27.5, 31.2, # ITT Environment 12 months
10.2, 6.0, # Per-protocol GAD-7 Anxiety post treatment
8.9, 6.7, # Per-protocol GAD-7 Anxiety 3 months
8.8, 6.2, # Per-protocol GAD-7 Anxiety 6 months
8.7, 5.8, # Per-protocol GAD-7 Anxiety 12 months
11.5, 7.0, # Per-protocol PHQ9 Depression post-treatment
10.3, 7.8, # Per protocol PHQ9 Depression 3 months
10.0, 7.3, # Per-protocol PHQ9 Depression 6 months
9.7, 7.1, # Per-protocol PHQ9 Depression 12 months
12.1, 9.1, # Per-protocol PHQ-15 post treatment
11.7, 9.5, # Per protocol PHQ-15 3 months
11.5, 9.2, # Per-protocol PHQ-15 6 months
11.7, 8.8, # Per-protocol PHQ-15 12 months
3.1, 2.4, # Per-protocol working life post treatment
2.6, 2.5, # Per protocol Working life 3 months
2.8, 1.9, # Per-protocol working life 6 months
3.3, 2.0, # Per-protocol working life 12 months
4.1, 2.9, # Per-protocol social life post treatment
3.4, 3.1, # Per protocol social life 3 months
3.6, 2.6, # Per-protocol social life 6 months
4.0, 2.6, # Per-protocol social life 12 months
4.0, 2.8, # Per-protocol Family life post treatment
3.5, 3.0, # Per protocol Family life 3 months
3.6, 2.6, # Per-protocol Family life 6 months
3.9, 2.5, # Per-protocol Family life 12 months
22.7, 25.1,# Per-protocol Physical post treatment
23.2, 24.4, # Per protocol Physical 3 months
23.1, 24.7, # Per-protocol Physical 6 months
22.7, 25.6, # Per-protocol Physical 12 months
17.4, 19.9, # Per-protocol Psychological post treatment
18.0, 19.3, # Per protocol Psychological 3 months
18.3, 19.3, # Per-protocol Psychological 6 months
18.3, 20.2, # Per-protocol Psychological 12 months
9.2, 10.0, # Per-protocol Social post treatment
9.3, 9.8, # Per protocol Social 3 months
9.6, 9.8, # Per-protocol Social 6 months
9.3, 10.0, # Per-protocol Social 12 months
25.5, 27.8, # Per-protocol Environment post treatment
26.1, 27.5, # Per protocol Environment 3 months
26.4, 27.7, # Per-protocol Environment 6 months
26.6, 28.3) # Per-protocol Environment 12 months
,
sd_post = c(
5.4, 4.7, # ITT GAD-7 Anxiety post-treatment
5.3, 5.0, # ITT GAD-7 Standard deviation 3 months
5.4, 5.1, # ITT GAD-7 Standard deviation 6 months
5.7, 5.4, # ITT GAD-7 Standard deviation 12 months
6.4, 5.7, # ITT PHQ9 Depression standard deviation post-treatment
6.4, 6.0, # ITT PHQ9 Depression standard deviation 3 months
6.4, 6.1, # ITT PHQ9 Depression standard deviation 6 months
6.3, 5.9, # ITT PHQ9 Depression standard deviation 12 months
5.2, 5.4, # ITT PHQ-15 standard deviation post-treatment
5.1, 5.3, # ITT PHQ-15 standard deviation 3 months
5.3, 5.6, # ITT PHQ-15 standard deviation 6 months
5.6, 5.6, # ITT PHQ-15 standard deviation 12 months
3.1, 3.0, # ITT working life standard deviation post-treatment
3.0, 3.0, # ITT working life standard deviation 3 months
3.0, 2.9, # ITT working life standard deviation 6 months
3.3, 3.2, # ITT working life standard deviation 12 months
3.1, 3.0, # ITT social life standard deviation post-treatment
3.1, 2.9, # ITT social life standard deviation 3 months
3.2, 3.1, # ITT social life standard deviation 6 months
3.4, 3.4, # ITT social life standard deviation 12 months
3.1, 2.9, # ITT Family life standard deviation post-treatment
3.1, 3.1, # ITT Family life standard deviation 3 months
3.2, 3.1, # ITT Family life standard deviation 6 months
3.3, 3.2, # ITT Family life standard deviation 12 months
4.5, 4.6, # ITT Physical standard deviation post-treatment
4.6, 4.8, # ITT Physical standard deviation 3 months
4.5, 4.4, # ITT Physical standard deviation 6 months
5.1, 5.3, # ITT Physical standard deviation 12 months
3.9, 4.0, # ITT Psychological standard deviation post-treatment
3.9, 4.2, # ITT Psychological standard deviation 3 months
3.8, 3.9, # ITT Psychological standard deviation 6 months
4.4, 4.6, # ITT Psychological standard deviation 12 months
3.1, 3.3, # ITT Social standard deviation post-treatment
2.3, 2.3, # ITT Social standard deviation 3 months
2.5, 2.2, # ITT Social standard deviation 6 months
2.2, 2.6, # ITT Social standard deviation 12 months
5.3, 5.6, # ITT Environment standard deviation post-treatment
4.9, 5.1, # ITT Environment standard deviation 3 months
4.8, 4.8, # ITT Environment standard deviation 6 months
5.0, 5.3, # ITT Environment standard deviation 12 months
5.5, 4.3, # Per-protocol GAD-7 Anxiety standard deviation post-treatment
5.4, 4.9, # Per-protocol GAD-7 Anxiety standard deviation 3 months
5.7, 4.9, # Per-protocol GAD-7 Anxiety standard deviation 6 months
5.8, 5.3, # Per-protocol GAD-7 Anxiety standard deviation 12 months
6.6, 5.2, # Per-protocol PHQ9 Depression standard deviation post-treatment
6.5, 6.0, # Per-protocol PHQ9 Depression standard deviation 3 months
6.6, 6.1, # Per-protocol PHQ9 Depression standard deviation 6 months
6.5, 6.2, # Per-protocol PHQ9 Depression standard deviation 12 months
5.2, 5.3, # Per-protocol PHQ-15 standard deviation post-treatment
5.0, 5.4, # Per-protocol PHQ-15 standard deviation 3 months
5.3, 5.7, # Per-protocol PHQ-15 standard deviation 6 months
5.6, 5.7, # Per-protocol PHQ-15 standard deviation 12 months
3.1, 2.9, # Per-protocol working life standard deviation post-treatment
3.0, 2.9, # Per-protocol working life standard deviation 3 months
3.0, 2.7, # Per-protocol working life standard deviation 6 months
3.3, 2.7, # Per-protocol working life standard deviation 12 months
3.1, 2.8, # Per-protocol social life standard deviation post-treatment
3.2, 2.9, # Per-protocol social life standard deviation 3 months
3.2, 2.8, # Per-protocol social life standard deviation 6 months
3.3, 3.1, # Per-protocol social life standard deviation 12 months
3.1, 3.1, # Per-protocol Family life standard deviation post-treatment
3.1, 3.0, # Per-protocol Family life standard deviation 3 months
3.1, 2.7, # Per-protocol Family life standard deviation 6 months
3.3, 2.8, # Per-protocol Family life standard deviation 12 months
4.6, 4.7, # Per-protocol Physical standard deviation post-treatment
4.8, 4.9, # Per-protocol Physical standard deviation 3 months
4.8, 4.9, # Per-protocol Physical standard deviation 6 months
5.1, 5.3, # Per-protocol Physical standard deviation 12 months
4.2, 4.0, # Per-protocol Psychological standard deviation post-treatment
4.0, 4.2, # Per-protocol Psychological standard deviation 3 months
4.2, 4.2, # Per-protocol Psychological standard deviation 6 months
4.4, 4.6, # Per-protocol Psychological standard deviation 12 months
2.4, 2.7, # Per-protocol Social standard deviation post-treatment
2.2, 2.4, # Per-protocol Social standard deviation 3 months
2.5, 2.2, # Per-protocol Social standard deviation 6 months
2.2, 2.6, # Per-protocol Social standard deviation 12 months
4.7, 4.8, # Per-protocol Environment standard deviation post-treatment
4.8, 5.2, # Per-protocol Environment standard deviation 3 months
4.8, 5.0, # Per-protocol Environment standard deviation 6 months
5.0, 5.3) # Per-protocol Environment standard deviation 12 months
)
Since we could not backout any pre-posttests correlation estiamtes, we used test-retest reliability measures from the given scale literature (Arbuckle et al., 2009; Ilić et al., 2019; Ravesteijn et al., 2009; Spitzer, Kroenke, Williams, & Löwe, 2006; Zuithoff et al., 2010) as recommended by Hedges et al (2023).
test_retest_cano2021 <-
tibble(
# Repeat 8 times to make it fit the es data (see below)
outcome = unique(Cano_vindel2021$outcome),
tr_reliability = c(
0.83, # From Spitzer et al. 2006
0.94, # From Zuithoff et al. 2010
0.60, # From Ravesteijn et al. 2009
0.63, # From Arbuckle et al. 2009
0.70, # From Arbuckle et al. 2009
0.61, # From Arbuckle et al. 2009
0.665, # Ilíc et al. 2019
0.724, # Ilíc et al. 2019
0.725, # Ilíc et al. 2019
0.60 # Ilíc et al. 2019
)
); test_retest_cano2021
## # A tibble: 10 × 2
## outcome tr_reliability
## <chr> <dbl>
## 1 GAD-7 0.83
## 2 PHQ-9 0.94
## 3 PHQ15 0.6
## 4 working_life_Function 0.63
## 5 Socal_life_Function 0.7
## 6 Family_life_Function 0.61
## 7 Physical_QoL 0.665
## 8 Psychological_QoL 0.724
## 9 Social_QoL 0.725
## 10 Environment_QoL 0.6
Effect size calculation, including cluster bias correction
# Turning data into wide format
params <- tibble(
filter_val1 = rep(unique(Cano_vindel2021$analysis), each = 4),
filter_val2 = rep(c("Post", paste0(c(3, 6, 12), "m")), 2)
)
wide_cano2021_func <-
function(filter_val1, filter_val2){
Cano_vindel2021 |>
filter(analysis == filter_val1 & timing == filter_val2) |>
mutate(group = case_match(group, "TAU-GCBT" ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
}
Cano_vindel2021_est <-
pmap(params, wide_cano2021_func) |>
list_rbind() |>
left_join(test_retest_cano2021) |>
rename(ppcor = tr_reliability) |>
mutate(
analysis_plan = case_when(
outcome == "GAD-7" ~ "All mental health outcomes/Anxiety",
outcome == "PHQ-9" ~ "All mental health outcomes/Depression",
outcome == "PHQ15" ~ "All mental health outcomes",
str_detect(outcome, "Funct") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "QoL") ~ "Wellbeing and Quality of Life",
TRUE ~ NA_character_
)
) |>
relocate(analysis_plan) |>
rowwise() |>
mutate(
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Cano-Vindel et al. 2021",
main_es_method = "Raw diff-in-diffs",
ppcor_method = "Based on test-retest reliability estimates",
N_total = N_t + N_c,
df_ind = N_total,
# Calculate d post
m_post = if_else(str_detect(outcome, "QoL"), m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Account for the fact that some outcomes are on different scales
m_diff_t = if_else(str_detect(outcome, "QoL"), m_post_t - m_pre_t, (m_post_t - m_pre_t) * -1),
m_diff_c = if_else(str_detect(outcome, "QoL"), m_post_c - m_pre_c, (m_post_c - m_pre_c) * -1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
# Average cluster size in treatment group
# "held over a 12–14-week period in small groups (8–10 patients) in the primary care centre" (p. 3338)
avg_cl_size = 9,
avg_cl_type = "From study (p. 3338)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste(analysis, outcome, timing, sep = "/")
) |>
ungroup(); Cano_vindel2021_est
## # A tibble: 80 × 63
## analysis_plan analysis outcome
## <chr> <chr> <chr>
## 1 All mental health outcomes/Anxiety ITT GAD-7
## 2 All mental health outcomes/Depression ITT PHQ-9
## 3 All mental health outcomes ITT PHQ15
## 4 Social functioning (degree of impairment) ITT working_life_Function
## 5 Social functioning (degree of impairment) ITT Socal_life_Function
## 6 Social functioning (degree of impairment) ITT Family_life_Function
## 7 Wellbeing and Quality of Life ITT Physical_QoL
## 8 Wellbeing and Quality of Life ITT Psychological_QoL
## 9 Wellbeing and Quality of Life ITT Social_QoL
## 10 Wellbeing and Quality of Life ITT Environment_QoL
## 11 All mental health outcomes/Anxiety ITT GAD-7
## 12 All mental health outcomes/Depression ITT PHQ-9
## 13 All mental health outcomes ITT PHQ15
## 14 Social functioning (degree of impairment) ITT working_life_Function
## 15 Social functioning (degree of impairment) ITT Socal_life_Function
## 16 Social functioning (degree of impairment) ITT Family_life_Function
## 17 Wellbeing and Quality of Life ITT Physical_QoL
## 18 Wellbeing and Quality of Life ITT Psychological_QoL
## 19 Wellbeing and Quality of Life ITT Social_QoL
## 20 Wellbeing and Quality of Life ITT Environment_QoL
## 21 All mental health outcomes/Anxiety ITT GAD-7
## 22 All mental health outcomes/Depression ITT PHQ-9
## 23 All mental health outcomes ITT PHQ15
## 24 Social functioning (degree of impairment) ITT working_life_Function
## 25 Social functioning (degree of impairment) ITT Socal_life_Function
## 26 Social functioning (degree of impairment) ITT Family_life_Function
## 27 Wellbeing and Quality of Life ITT Physical_QoL
## 28 Wellbeing and Quality of Life ITT Psychological_QoL
## 29 Wellbeing and Quality of Life ITT Social_QoL
## 30 Wellbeing and Quality of Life ITT Environment_QoL
## 31 All mental health outcomes/Anxiety ITT GAD-7
## 32 All mental health outcomes/Depression ITT PHQ-9
## 33 All mental health outcomes ITT PHQ15
## 34 Social functioning (degree of impairment) ITT working_life_Function
## 35 Social functioning (degree of impairment) ITT Socal_life_Function
## 36 Social functioning (degree of impairment) ITT Family_life_Function
## 37 Wellbeing and Quality of Life ITT Physical_QoL
## 38 Wellbeing and Quality of Life ITT Psychological_QoL
## 39 Wellbeing and Quality of Life ITT Social_QoL
## 40 Wellbeing and Quality of Life ITT Environment_QoL
## 41 All mental health outcomes/Anxiety Per-protocol GAD-7
## 42 All mental health outcomes/Depression Per-protocol PHQ-9
## 43 All mental health outcomes Per-protocol PHQ15
## 44 Social functioning (degree of impairment) Per-protocol working_life_Function
## 45 Social functioning (degree of impairment) Per-protocol Socal_life_Function
## 46 Social functioning (degree of impairment) Per-protocol Family_life_Function
## 47 Wellbeing and Quality of Life Per-protocol Physical_QoL
## 48 Wellbeing and Quality of Life Per-protocol Psychological_QoL
## 49 Wellbeing and Quality of Life Per-protocol Social_QoL
## 50 Wellbeing and Quality of Life Per-protocol Environment_QoL
## 51 All mental health outcomes/Anxiety Per-protocol GAD-7
## 52 All mental health outcomes/Depression Per-protocol PHQ-9
## 53 All mental health outcomes Per-protocol PHQ15
## 54 Social functioning (degree of impairment) Per-protocol working_life_Function
## 55 Social functioning (degree of impairment) Per-protocol Socal_life_Function
## 56 Social functioning (degree of impairment) Per-protocol Family_life_Function
## 57 Wellbeing and Quality of Life Per-protocol Physical_QoL
## 58 Wellbeing and Quality of Life Per-protocol Psychological_QoL
## 59 Wellbeing and Quality of Life Per-protocol Social_QoL
## 60 Wellbeing and Quality of Life Per-protocol Environment_QoL
## 61 All mental health outcomes/Anxiety Per-protocol GAD-7
## 62 All mental health outcomes/Depression Per-protocol PHQ-9
## 63 All mental health outcomes Per-protocol PHQ15
## 64 Social functioning (degree of impairment) Per-protocol working_life_Function
## 65 Social functioning (degree of impairment) Per-protocol Socal_life_Function
## 66 Social functioning (degree of impairment) Per-protocol Family_life_Function
## 67 Wellbeing and Quality of Life Per-protocol Physical_QoL
## 68 Wellbeing and Quality of Life Per-protocol Psychological_QoL
## 69 Wellbeing and Quality of Life Per-protocol Social_QoL
## 70 Wellbeing and Quality of Life Per-protocol Environment_QoL
## 71 All mental health outcomes/Anxiety Per-protocol GAD-7
## 72 All mental health outcomes/Depression Per-protocol PHQ-9
## 73 All mental health outcomes Per-protocol PHQ15
## 74 Social functioning (degree of impairment) Per-protocol working_life_Function
## 75 Social functioning (degree of impairment) Per-protocol Socal_life_Function
## 76 Social functioning (degree of impairment) Per-protocol Family_life_Function
## 77 Wellbeing and Quality of Life Per-protocol Physical_QoL
## 78 Wellbeing and Quality of Life Per-protocol Psychological_QoL
## 79 Wellbeing and Quality of Life Per-protocol Social_QoL
## 80 Wellbeing and Quality of Life Per-protocol Environment_QoL
## timing N_c N_t N_start_c N_start_t m_pre_c m_pre_t sd_pre_c sd_pre_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Post 534 527 534 534 12.1 12.5 4.7 4.6
## 2 Post 534 527 534 534 13.5 13.7 5.4 5.3
## 3 Post 534 527 534 534 14 14.3 4.8 4.9
## 4 Post 534 527 534 534 3.5 3.6 3.1 3.2
## 5 Post 534 527 534 534 4.6 4.7 3 3
## 6 Post 534 527 534 534 4.6 4.8 3.1 3
## 7 Post 534 527 534 534 22.4 22.1 4.3 4.3
## 8 Post 534 527 534 534 16.9 16.9 3.8 3.8
## 9 Post 534 527 534 534 9.1 9.1 2.4 2.4
## 10 Post 534 527 534 534 25.3 25.7 4.5 4.6
## 11 3m 534 527 534 534 12.1 12.5 4.7 4.6
## 12 3m 534 527 534 534 13.5 13.7 5.4 5.3
## 13 3m 534 527 534 534 14 14.3 4.8 4.9
## 14 3m 534 527 534 534 3.5 3.6 3.1 3.2
## 15 3m 534 527 534 534 4.6 4.7 3 3
## 16 3m 534 527 534 534 4.6 4.8 3.1 3
## 17 3m 534 527 534 534 22.4 22.1 4.3 4.3
## 18 3m 534 527 534 534 16.9 16.9 3.8 3.8
## 19 3m 534 527 534 534 9.1 9.1 2.4 2.4
## 20 3m 534 527 534 534 25.3 25.7 4.5 4.6
## 21 6m 534 527 534 534 12.1 12.5 4.7 4.6
## 22 6m 534 527 534 534 13.5 13.7 5.4 5.3
## 23 6m 534 527 534 534 14 14.3 4.8 4.9
## 24 6m 534 527 534 534 3.5 3.6 3.1 3.2
## 25 6m 534 527 534 534 4.6 4.7 3 3
## 26 6m 534 527 534 534 4.6 4.8 3.1 3
## 27 6m 534 527 534 534 22.4 22.1 4.3 4.3
## 28 6m 534 527 534 534 16.9 16.9 3.8 3.8
## 29 6m 534 527 534 534 9.1 9.1 2.4 2.4
## 30 6m 534 527 534 534 25.3 25.7 4.5 4.6
## 31 12m 534 527 534 534 12.1 12.5 4.7 4.6
## 32 12m 534 527 534 534 13.5 13.7 5.4 5.3
## 33 12m 534 527 534 534 14 14.3 4.8 4.9
## 34 12m 534 527 534 534 3.5 3.6 3.1 3.2
## 35 12m 534 527 534 534 4.6 4.7 3 3
## 36 12m 534 527 534 534 4.6 4.8 3.1 3
## 37 12m 534 527 534 534 22.4 22.1 4.3 4.3
## 38 12m 534 527 534 534 16.9 16.9 3.8 3.8
## 39 12m 534 527 534 534 9.1 9.1 2.4 2.4
## 40 12m 534 527 534 534 25.3 25.7 4.5 4.6
## 41 Post 316 315 527 527 12.1 12.5 4.7 4.6
## 42 Post 316 315 527 527 13.5 13.7 5.4 5.3
## 43 Post 316 315 527 527 14 14.3 4.8 4.9
## 44 Post 316 315 527 527 3.5 3.6 3.1 3.2
## 45 Post 316 315 527 527 4.6 4.7 3 3
## 46 Post 316 315 527 527 4.6 4.8 3.1 3
## 47 Post 316 315 527 527 22.4 22.1 4.3 4.3
## 48 Post 316 315 527 527 16.9 16.9 3.8 3.8
## 49 Post 316 315 527 527 9.1 9.1 2.4 2.4
## 50 Post 316 315 527 527 25.3 25.7 4.5 4.6
## 51 3m 238 273 527 527 12.1 12.5 4.7 4.6
## 52 3m 238 273 527 527 13.5 13.7 5.4 5.3
## 53 3m 238 273 527 527 14 14.3 4.8 4.9
## 54 3m 238 273 527 527 3.5 3.6 3.1 3.2
## 55 3m 238 273 527 527 4.6 4.7 3 3
## 56 3m 238 273 527 527 4.6 4.8 3.1 3
## 57 3m 238 273 527 527 22.4 22.1 4.3 4.3
## 58 3m 238 273 527 527 16.9 16.9 3.8 3.8
## 59 3m 238 273 527 527 9.1 9.1 2.4 2.4
## 60 3m 238 273 527 527 25.3 25.7 4.5 4.6
## 61 6m 204 229 527 527 12.1 12.5 4.7 4.6
## 62 6m 204 229 527 527 13.5 13.7 5.4 5.3
## 63 6m 204 229 527 527 14 14.3 4.8 4.9
## 64 6m 204 229 527 527 3.5 3.6 3.1 3.2
## 65 6m 204 229 527 527 4.6 4.7 3 3
## 66 6m 204 229 527 527 4.6 4.8 3.1 3
## 67 6m 204 229 527 527 22.4 22.1 4.3 4.3
## 68 6m 204 229 527 527 16.9 16.9 3.8 3.8
## 69 6m 204 229 527 527 9.1 9.1 2.4 2.4
## 70 6m 204 229 527 527 25.3 25.7 4.5 4.6
## 71 12m 180 208 527 527 12.1 12.5 4.7 4.6
## 72 12m 180 208 527 527 13.5 13.7 5.4 5.3
## 73 12m 180 208 527 527 14 14.3 4.8 4.9
## 74 12m 180 208 527 527 3.5 3.6 3.1 3.2
## 75 12m 180 208 527 527 4.6 4.7 3 3
## 76 12m 180 208 527 527 4.6 4.8 3.1 3
## 77 12m 180 208 527 527 22.4 22.1 4.3 4.3
## 78 12m 180 208 527 527 16.9 16.9 3.8 3.8
## 79 12m 180 208 527 527 9.1 9.1 2.4 2.4
## 80 12m 180 208 527 527 25.3 25.7 4.5 4.6
## m_post_c m_post_t sd_post_c sd_post_t ppcor effect_size sd_used
## <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <chr>
## 1 9.5 6.8 5.4 4.7 0.83 SMD Pooled posttest SD
## 2 10.8 8 6.4 5.7 0.94 SMD Pooled posttest SD
## 3 11.7 9.9 5.2 5.4 0.6 SMD Pooled posttest SD
## 4 3 2.6 3.1 3 0.63 SMD Pooled posttest SD
## 5 4.1 3.2 3.1 3 0.7 SMD Pooled posttest SD
## 6 3.9 3.1 3.1 2.9 0.61 SMD Pooled posttest SD
## 7 23.2 24.7 4.5 4.6 0.665 SMD Pooled posttest SD
## 8 17.7 19.2 3.9 4 0.724 SMD Pooled posttest SD
## 9 9.4 9.8 3.1 3.3 0.725 SMD Pooled posttest SD
## 10 25.7 27.2 5.3 5.6 0.6 SMD Pooled posttest SD
## 11 8.7 7.3 5.3 5 0.83 SMD Pooled posttest SD
## 12 10.2 8.4 6.4 6 0.94 SMD Pooled posttest SD
## 13 11.4 10.1 5.1 5.3 0.6 SMD Pooled posttest SD
## 14 2.7 2.4 3 3 0.63 SMD Pooled posttest SD
## 15 3.5 3.2 3.1 2.9 0.7 SMD Pooled posttest SD
## 16 3.5 3.1 3.1 3.1 0.61 SMD Pooled posttest SD
## 17 23.5 24.2 4.6 4.8 0.665 SMD Pooled posttest SD
## 18 18.1 18.9 3.9 4.2 0.724 SMD Pooled posttest SD
## 19 9.5 9.7 2.3 2.3 0.725 SMD Pooled posttest SD
## 20 26.1 26.9 4.9 5.1 0.6 SMD Pooled posttest SD
## 21 8.6 6.9 5.4 5.1 0.83 SMD Pooled posttest SD
## 22 9.8 7.9 6.4 6.1 0.94 SMD Pooled posttest SD
## 23 11.1 9.8 5.3 5.6 0.6 SMD Pooled posttest SD
## 24 2.7 2.1 3 2.9 0.63 SMD Pooled posttest SD
## 25 3.4 2.7 3.2 3.1 0.7 SMD Pooled posttest SD
## 26 3.6 2.7 3.2 3.1 0.61 SMD Pooled posttest SD
## 27 23.6 24.3 4.5 4.4 0.665 SMD Pooled posttest SD
## 28 18.5 19.1 3.8 3.9 0.724 SMD Pooled posttest SD
## 29 9.5 9.7 2.5 2.2 0.725 SMD Pooled posttest SD
## 30 26.5 27.1 4.8 4.8 0.6 SMD Pooled posttest SD
## 31 8.3 6.6 5.7 5.4 0.83 SMD Pooled posttest SD
## 32 9.4 7.8 6.3 5.9 0.94 SMD Pooled posttest SD
## 33 10.7 9.4 5.6 5.6 0.6 SMD Pooled posttest SD
## 34 3.1 2.4 3.3 3.2 0.63 SMD Pooled posttest SD
## 35 3.8 2.9 3.4 3.4 0.7 SMD Pooled posttest SD
## 36 3.8 2.8 3.3 3.2 0.61 SMD Pooled posttest SD
## 37 24.2 26.4 5.1 5.3 0.665 SMD Pooled posttest SD
## 38 18.7 20.8 4.4 4.6 0.724 SMD Pooled posttest SD
## 39 9.7 11.1 2.2 2.6 0.725 SMD Pooled posttest SD
## 40 27.5 31.2 5 5.3 0.6 SMD Pooled posttest SD
## 41 10.2 6 5.5 4.3 0.83 SMD Pooled posttest SD
## 42 11.5 7 6.6 5.2 0.94 SMD Pooled posttest SD
## 43 12.1 9.1 5.2 5.3 0.6 SMD Pooled posttest SD
## 44 3.1 2.4 3.1 2.9 0.63 SMD Pooled posttest SD
## 45 4.1 2.9 3.1 2.8 0.7 SMD Pooled posttest SD
## 46 4 2.8 3.1 3.1 0.61 SMD Pooled posttest SD
## 47 22.7 25.1 4.6 4.7 0.665 SMD Pooled posttest SD
## 48 17.4 19.9 4.2 4 0.724 SMD Pooled posttest SD
## 49 9.2 10 2.4 2.7 0.725 SMD Pooled posttest SD
## 50 25.5 27.8 4.7 4.8 0.6 SMD Pooled posttest SD
## 51 8.9 6.7 5.4 4.9 0.83 SMD Pooled posttest SD
## 52 10.3 7.8 6.5 6 0.94 SMD Pooled posttest SD
## 53 11.7 9.5 5 5.4 0.6 SMD Pooled posttest SD
## 54 2.6 2.5 3 2.9 0.63 SMD Pooled posttest SD
## 55 3.4 3.1 3.2 2.9 0.7 SMD Pooled posttest SD
## 56 3.5 3 3.1 3 0.61 SMD Pooled posttest SD
## 57 23.2 24.4 4.8 4.9 0.665 SMD Pooled posttest SD
## 58 18 19.3 4 4.2 0.724 SMD Pooled posttest SD
## 59 9.3 9.8 2.2 2.4 0.725 SMD Pooled posttest SD
## 60 26.1 27.5 4.8 5.2 0.6 SMD Pooled posttest SD
## 61 8.8 6.2 5.7 4.9 0.83 SMD Pooled posttest SD
## 62 10 7.3 6.6 6.1 0.94 SMD Pooled posttest SD
## 63 11.5 9.2 5.3 5.7 0.6 SMD Pooled posttest SD
## 64 2.8 1.9 3 2.7 0.63 SMD Pooled posttest SD
## 65 3.6 2.6 3.2 2.8 0.7 SMD Pooled posttest SD
## 66 3.6 2.6 3.1 2.7 0.61 SMD Pooled posttest SD
## 67 23.1 24.7 4.8 4.9 0.665 SMD Pooled posttest SD
## 68 18.3 19.3 4.2 4.2 0.724 SMD Pooled posttest SD
## 69 9.6 9.8 2.5 2.2 0.725 SMD Pooled posttest SD
## 70 26.4 27.7 4.8 5 0.6 SMD Pooled posttest SD
## 71 8.7 5.8 5.8 5.3 0.83 SMD Pooled posttest SD
## 72 9.7 7.1 6.5 6.2 0.94 SMD Pooled posttest SD
## 73 11.7 8.8 5.6 5.7 0.6 SMD Pooled posttest SD
## 74 3.3 2 3.3 2.7 0.63 SMD Pooled posttest SD
## 75 4 2.6 3.3 3.1 0.7 SMD Pooled posttest SD
## 76 3.9 2.5 3.3 2.8 0.61 SMD Pooled posttest SD
## 77 22.7 25.6 5.1 5.3 0.665 SMD Pooled posttest SD
## 78 18.3 20.2 4.4 4.6 0.724 SMD Pooled posttest SD
## 79 9.3 10 2.2 2.6 0.725 SMD Pooled posttest SD
## 80 26.6 28.3 5 5.3 0.6 SMD Pooled posttest SD
## study main_es_method
## <chr> <chr>
## 1 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 2 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 3 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 4 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 5 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 6 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 7 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 8 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 9 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 10 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 11 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 12 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 13 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 14 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 15 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 16 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 17 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 18 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 19 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 20 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 21 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 22 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 23 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 24 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 25 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 26 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 27 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 28 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 29 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 30 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 31 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 32 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 33 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 34 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 35 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 36 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 37 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 38 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 39 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 40 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 41 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 42 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 43 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 44 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 45 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 46 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 47 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 48 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 49 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 50 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 51 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 52 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 53 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 54 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 55 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 56 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 57 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 58 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 59 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 60 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 61 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 62 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 63 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 64 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 65 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 66 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 67 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 68 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 69 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 70 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 71 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 72 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 73 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 74 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 75 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 76 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 77 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 78 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 79 Cano-Vindel et al. 2021 Raw diff-in-diffs
## 80 Cano-Vindel et al. 2021 Raw diff-in-diffs
## ppcor_method N_total df_ind m_post sd_pool
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Based on test-retest reliability estimates 1061 1061 2.7 5.064
## 2 Based on test-retest reliability estimates 1061 1061 2.8 6.062
## 3 Based on test-retest reliability estimates 1061 1061 1.800 5.300
## 4 Based on test-retest reliability estimates 1061 1061 0.4 3.051
## 5 Based on test-retest reliability estimates 1061 1061 0.9000 3.051
## 6 Based on test-retest reliability estimates 1061 1061 0.8 3.002
## 7 Based on test-retest reliability estimates 1061 1061 1.5 4.550
## 8 Based on test-retest reliability estimates 1061 1061 1.5 3.950
## 9 Based on test-retest reliability estimates 1061 1061 0.4000 3.201
## 10 Based on test-retest reliability estimates 1061 1061 1.5 5.451
## 11 Based on test-retest reliability estimates 1061 1061 1.4 5.153
## 12 Based on test-retest reliability estimates 1061 1061 1.800 6.205
## 13 Based on test-retest reliability estimates 1061 1061 1.3 5.200
## 14 Based on test-retest reliability estimates 1061 1061 0.3000 3
## 15 Based on test-retest reliability estimates 1061 1061 0.3000 3.002
## 16 Based on test-retest reliability estimates 1061 1061 0.4 3.1
## 17 Based on test-retest reliability estimates 1061 1061 0.7000 4.700
## 18 Based on test-retest reliability estimates 1061 1061 0.8000 4.052
## 19 Based on test-retest reliability estimates 1061 1061 0.2000 2.3
## 20 Based on test-retest reliability estimates 1061 1061 0.8000 5.000
## 21 Based on test-retest reliability estimates 1061 1061 1.7 5.253
## 22 Based on test-retest reliability estimates 1061 1061 1.9 6.253
## 23 Based on test-retest reliability estimates 1061 1061 1.300 5.451
## 24 Based on test-retest reliability estimates 1061 1061 0.6 2.951
## 25 Based on test-retest reliability estimates 1061 1061 0.7 3.151
## 26 Based on test-retest reliability estimates 1061 1061 0.9 3.151
## 27 Based on test-retest reliability estimates 1061 1061 0.7000 4.451
## 28 Based on test-retest reliability estimates 1061 1061 0.6000 3.850
## 29 Based on test-retest reliability estimates 1061 1061 0.2000 2.356
## 30 Based on test-retest reliability estimates 1061 1061 0.6000 4.8
## 31 Based on test-retest reliability estimates 1061 1061 1.700 5.553
## 32 Based on test-retest reliability estimates 1061 1061 1.6 6.105
## 33 Based on test-retest reliability estimates 1061 1061 1.300 5.6
## 34 Based on test-retest reliability estimates 1061 1061 0.7 3.251
## 35 Based on test-retest reliability estimates 1061 1061 0.9 3.4
## 36 Based on test-retest reliability estimates 1061 1061 1 3.251
## 37 Based on test-retest reliability estimates 1061 1061 2.2 5.200
## 38 Based on test-retest reliability estimates 1061 1061 2.100 4.500
## 39 Based on test-retest reliability estimates 1061 1061 1.4 2.407
## 40 Based on test-retest reliability estimates 1061 1061 3.7 5.151
## 41 Based on test-retest reliability estimates 631 631 4.2 4.938
## 42 Based on test-retest reliability estimates 631 631 4.5 5.942
## 43 Based on test-retest reliability estimates 631 631 3 5.250
## 44 Based on test-retest reliability estimates 631 631 0.7 3.002
## 45 Based on test-retest reliability estimates 631 631 1.2 2.954
## 46 Based on test-retest reliability estimates 631 631 1.2 3.1
## 47 Based on test-retest reliability estimates 631 631 2.400 4.650
## 48 Based on test-retest reliability estimates 631 631 2.5 4.101
## 49 Based on test-retest reliability estimates 631 631 0.8000 2.554
## 50 Based on test-retest reliability estimates 631 631 2.3 4.750
## 51 Based on test-retest reliability estimates 511 511 2.2 5.139
## 52 Based on test-retest reliability estimates 511 511 2.5 6.238
## 53 Based on test-retest reliability estimates 511 511 2.2 5.218
## 54 Based on test-retest reliability estimates 511 511 0.1000 2.947
## 55 Based on test-retest reliability estimates 511 511 0.3000 3.043
## 56 Based on test-retest reliability estimates 511 511 0.5 3.047
## 57 Based on test-retest reliability estimates 511 511 1.200 4.854
## 58 Based on test-retest reliability estimates 511 511 1.3 4.108
## 59 Based on test-retest reliability estimates 511 511 0.5 2.309
## 60 Based on test-retest reliability estimates 511 511 1.400 5.018
## 61 Based on test-retest reliability estimates 433 433 2.6 5.292
## 62 Based on test-retest reliability estimates 433 433 2.7 6.340
## 63 Based on test-retest reliability estimates 433 433 2.3 5.515
## 64 Based on test-retest reliability estimates 433 433 0.9 2.845
## 65 Based on test-retest reliability estimates 433 433 1 2.995
## 66 Based on test-retest reliability estimates 433 433 1 2.895
## 67 Based on test-retest reliability estimates 433 433 1.600 4.853
## 68 Based on test-retest reliability estimates 433 433 1 4.2
## 69 Based on test-retest reliability estimates 433 433 0.2000 2.346
## 70 Based on test-retest reliability estimates 433 433 1.3 4.907
## 71 Based on test-retest reliability estimates 388 388 2.9 5.537
## 72 Based on test-retest reliability estimates 388 388 2.6 6.341
## 73 Based on test-retest reliability estimates 388 388 2.9 5.654
## 74 Based on test-retest reliability estimates 388 388 1.3 2.993
## 75 Based on test-retest reliability estimates 388 388 1.4 3.194
## 76 Based on test-retest reliability estimates 388 388 1.4 3.042
## 77 Based on test-retest reliability estimates 388 388 2.900 5.208
## 78 Based on test-retest reliability estimates 388 388 1.900 4.508
## 79 Based on test-retest reliability estimates 388 388 0.7000 2.423
## 80 Based on test-retest reliability estimates 388 388 1.7 5.163
## d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5331 0.003904 0.003770 0.9993 0.5328 0.003904 0.003770 5.7 2.6
## 2 0.4619 0.003871 0.003770 0.9993 0.4615 0.003871 0.003770 5.7 2.7
## 3 0.3396 0.003825 0.003770 0.9993 0.3394 0.003824 0.003770 4.4 2.3
## 4 0.1311 0.003778 0.003770 0.9993 0.1310 0.003778 0.003770 1 0.5
## 5 0.2950 0.003811 0.003770 0.9993 0.2948 0.003811 0.003770 1.5 0.5
## 6 0.2665 0.003804 0.003770 0.9993 0.2663 0.003804 0.003770 1.7 0.7
## 7 0.3297 0.003821 0.003770 0.9993 0.3294 0.003821 0.003770 2.600 0.8000
## 8 0.3797 0.003838 0.003770 0.9993 0.3795 0.003838 0.003770 2.3 0.8000
## 9 0.1250 0.003778 0.003770 0.9993 0.1249 0.003778 0.003770 0.7000 0.3000
## 10 0.2752 0.003806 0.003770 0.9993 0.2750 0.003806 0.003770 1.5 0.4000
## 11 0.2717 0.003805 0.003770 0.9993 0.2715 0.003805 0.003770 5.2 3.4
## 12 0.2901 0.003810 0.003770 0.9993 0.2899 0.003810 0.003770 5.3 3.3
## 13 0.2500 0.003800 0.003770 0.9993 0.2498 0.003800 0.003770 4.2 2.6
## 14 0.1000 0.003775 0.003770 0.9993 0.09993 0.003775 0.003770 1.2 0.8
## 15 0.09992 0.003775 0.003770 0.9993 0.09985 0.003775 0.003770 1.5 1.1
## 16 0.1290 0.003778 0.003770 0.9993 0.1289 0.003778 0.003770 1.7 1.1
## 17 0.1489 0.003781 0.003770 0.9993 0.1488 0.003781 0.003770 2.100 1.100
## 18 0.1974 0.003789 0.003770 0.9993 0.1973 0.003789 0.003770 2 1.200
## 19 0.08696 0.003774 0.003770 0.9993 0.08690 0.003774 0.003770 0.6000 0.4000
## 20 0.1600 0.003782 0.003770 0.9993 0.1599 0.003782 0.003770 1.200 0.8000
## 21 0.3236 0.003820 0.003770 0.9993 0.3234 0.003819 0.003770 5.6 3.5
## 22 0.3039 0.003814 0.003770 0.9993 0.3036 0.003814 0.003770 5.8 3.7
## 23 0.2385 0.003797 0.003770 0.9993 0.2383 0.003797 0.003770 4.5 2.9
## 24 0.2033 0.003790 0.003770 0.9993 0.2032 0.003790 0.003770 1.5 0.8
## 25 0.2222 0.003793 0.003770 0.9993 0.2220 0.003793 0.003770 2 1.2
## 26 0.2856 0.003809 0.003770 0.9993 0.2854 0.003809 0.003770 2.1 1
## 27 0.1573 0.003782 0.003770 0.9993 0.1572 0.003782 0.003770 2.2 1.200
## 28 0.1558 0.003782 0.003770 0.9993 0.1557 0.003782 0.003770 2.200 1.600
## 29 0.08490 0.003774 0.003770 0.9993 0.08484 0.003774 0.003770 0.6000 0.4000
## 30 0.1250 0.003778 0.003770 0.9993 0.1249 0.003778 0.003770 1.400 1.200
## 31 0.3061 0.003814 0.003770 0.9993 0.3059 0.003814 0.003770 5.9 3.8
## 32 0.2621 0.003803 0.003770 0.9993 0.2619 0.003803 0.003770 5.9 4.1
## 33 0.2321 0.003796 0.003770 0.9993 0.2320 0.003796 0.003770 4.9 3.3
## 34 0.2153 0.003792 0.003770 0.9993 0.2152 0.003792 0.003770 1.2 0.4
## 35 0.2647 0.003803 0.003770 0.9993 0.2645 0.003803 0.003770 1.8 0.8
## 36 0.3076 0.003815 0.003770 0.9993 0.3074 0.003815 0.003770 2 0.8
## 37 0.4231 0.003855 0.003770 0.9993 0.4228 0.003854 0.003770 4.300 1.8
## 38 0.4666 0.003873 0.003770 0.9993 0.4663 0.003873 0.003770 3.90 1.8
## 39 0.5816 0.003930 0.003770 0.9993 0.5812 0.003929 0.003770 2 0.6000
## 40 0.7183 0.004013 0.003770 0.9993 0.7178 0.004013 0.003770 5.5 2.2
## 41 0.8506 0.006913 0.006339 0.9988 0.8496 0.006911 0.006339 6.5 1.9
## 42 0.7573 0.006794 0.006339 0.9988 0.7564 0.006792 0.006339 6.7 2
## 43 0.5714 0.006598 0.006339 0.9988 0.5707 0.006597 0.006339 5.2 1.9
## 44 0.2332 0.006382 0.006339 0.9988 0.2329 0.006382 0.006339 1.2 0.4
## 45 0.4062 0.006470 0.006339 0.9988 0.4057 0.006470 0.006339 1.8 0.5
## 46 0.3871 0.006458 0.006339 0.9988 0.3866 0.006458 0.006339 2 0.6000
## 47 0.5161 0.006550 0.006339 0.9988 0.5155 0.006550 0.006339 3 0.3000
## 48 0.6096 0.006634 0.006339 0.9988 0.6088 0.006633 0.006339 3 0.5
## 49 0.3132 0.006417 0.006339 0.9988 0.3128 0.006417 0.006339 0.9 0.1000
## 50 0.4842 0.006525 0.006339 0.9988 0.4836 0.006524 0.006339 2.100 0.2000
## 51 0.4281 0.008044 0.007865 0.9985 0.4275 0.008043 0.007865 5.8 3.2
## 52 0.4008 0.008022 0.007865 0.9985 0.4002 0.008021 0.007865 5.9 3.2
## 53 0.4217 0.008039 0.007865 0.9985 0.4210 0.008038 0.007865 4.8 2.3
## 54 0.03393 0.007866 0.007865 0.9985 0.03388 0.007866 0.007865 1.1 0.9
## 55 0.09858 0.007874 0.007865 0.9985 0.09843 0.007874 0.007865 1.6 1.2
## 56 0.1641 0.007891 0.007865 0.9985 0.1639 0.007891 0.007865 1.8 1.1
## 57 0.2472 0.007924 0.007865 0.9985 0.2469 0.007924 0.007865 2.300 0.8000
## 58 0.3164 0.007963 0.007865 0.9985 0.3160 0.007962 0.007865 2.400 1.100
## 59 0.2165 0.007911 0.007865 0.9985 0.2162 0.007910 0.007865 0.7000 0.2000
## 60 0.2790 0.007941 0.007865 0.9985 0.2786 0.007941 0.007865 1.8 0.8000
## 61 0.4913 0.009548 0.009269 0.9983 0.4905 0.009547 0.009269 6.3 3.3
## 62 0.4258 0.009478 0.009269 0.9983 0.4251 0.009477 0.009269 6.4 3.5
## 63 0.4170 0.009470 0.009269 0.9983 0.4163 0.009469 0.009269 5.1 2.5
## 64 0.3163 0.009384 0.009269 0.9983 0.3158 0.009384 0.009269 1.7 0.7
## 65 0.3339 0.009398 0.009269 0.9983 0.3333 0.009397 0.009269 2.1 1
## 66 0.3454 0.009407 0.009269 0.9983 0.3448 0.009406 0.009269 2.2 1
## 67 0.3297 0.009394 0.009269 0.9983 0.3291 0.009394 0.009269 2.600 0.7000
## 68 0.2381 0.009334 0.009269 0.9983 0.2377 0.009334 0.009269 2.400 1.400
## 69 0.08525 0.009277 0.009269 0.9983 0.08510 0.009277 0.009269 0.7000 0.5
## 70 0.2649 0.009350 0.009269 0.9983 0.2645 0.009350 0.009269 2 1.100
## 71 0.5237 0.01072 0.01036 0.9981 0.5227 0.01072 0.01036 6.7 3.4
## 72 0.4100 0.01058 0.01036 0.9981 0.4092 0.01058 0.01036 6.6 3.8
## 73 0.5129 0.01070 0.01036 0.9981 0.5119 0.01070 0.01036 5.5 2.3
## 74 0.4343 0.01061 0.01036 0.9981 0.4335 0.01061 0.01036 1.6 0.2000
## 75 0.4383 0.01061 0.01036 0.9981 0.4374 0.01061 0.01036 2.1 0.6000
## 76 0.4602 0.01064 0.01036 0.9981 0.4593 0.01064 0.01036 2.3 0.7
## 77 0.5568 0.01076 0.01036 0.9981 0.5557 0.01076 0.01036 3.5 0.3000
## 78 0.4214 0.01059 0.01036 0.9981 0.4206 0.01059 0.01036 3.3 1.400
## 79 0.2889 0.01047 0.01036 0.9981 0.2884 0.01047 0.01036 0.9 0.2000
## 80 0.3293 0.01050 0.01036 0.9981 0.3286 0.01050 0.01036 2.6 1.3
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.6121 0.001458 0.001282 0.6117 0.001458 0.001282 9
## 2 0.4949 0.0005678 0.0004524 0.4945 0.0005677 0.0004524 9
## 3 0.3962 0.003090 0.003016 0.3959 0.003090 0.003016 9
## 4 0.1639 0.002803 0.002790 0.1638 0.002803 0.002790 9
## 5 0.3278 0.002313 0.002262 0.3276 0.002313 0.002262 9
## 6 0.3331 0.002993 0.002941 0.3328 0.002993 0.002941 9
## 7 0.3956 0.002600 0.002526 0.3953 0.002600 0.002526 9
## 8 0.3797 0.002149 0.002081 0.3795 0.002149 0.002081 9
## 9 0.1250 0.002081 0.002074 0.1249 0.002081 0.002074 9
## 10 0.2018 0.003035 0.003016 0.2017 0.003035 0.003016 9
## 11 0.3493 0.001339 0.001282 0.3491 0.001339 0.001282 9
## 12 0.3223 0.0005014 0.0004524 0.3221 0.0005013 0.0004524 9
## 13 0.3077 0.003061 0.003016 0.3075 0.003061 0.003016 9
## 14 0.1333 0.002798 0.002790 0.1332 0.002798 0.002790 9
## 15 0.1332 0.002270 0.002262 0.1331 0.002270 0.002262 9
## 16 0.1935 0.002958 0.002941 0.1934 0.002958 0.002941 9
## 17 0.2127 0.002547 0.002526 0.2126 0.002547 0.002526 9
## 18 0.1974 0.002100 0.002081 0.1973 0.002099 0.002081 9
## 19 0.08696 0.002077 0.002074 0.08690 0.002077 0.002074 9
## 20 0.07999 0.003019 0.003016 0.07994 0.003019 0.003016 9
## 21 0.3998 0.001357 0.001282 0.3995 0.001357 0.001282 9
## 22 0.3359 0.0005056 0.0004524 0.3356 0.0005055 0.0004524 9
## 23 0.2935 0.003057 0.003016 0.2933 0.003057 0.003016 9
## 24 0.2372 0.002816 0.002790 0.2371 0.002816 0.002790 9
## 25 0.2539 0.002292 0.002262 0.2537 0.002292 0.002262 9
## 26 0.3491 0.002998 0.002941 0.3489 0.002998 0.002941 9
## 27 0.2247 0.002550 0.002526 0.2245 0.002550 0.002526 9
## 28 0.1558 0.002093 0.002081 0.1557 0.002093 0.002081 9
## 29 0.08490 0.002077 0.002074 0.08484 0.002077 0.002074 9
## 30 0.04167 0.003017 0.003016 0.04164 0.003017 0.003016 9
## 31 0.3782 0.001349 0.001282 0.3779 0.001349 0.001282 9
## 32 0.2949 0.0004934 0.0004524 0.2947 0.0004933 0.0004524 9
## 33 0.2857 0.003055 0.003016 0.2855 0.003055 0.003016 9
## 34 0.2461 0.002818 0.002790 0.2459 0.002818 0.002790 9
## 35 0.2941 0.002303 0.002262 0.2939 0.002303 0.002262 9
## 36 0.3691 0.003005 0.002941 0.3689 0.003005 0.002941 9
## 37 0.4807 0.002635 0.002526 0.4804 0.002635 0.002526 9
## 38 0.4666 0.002184 0.002081 0.4663 0.002184 0.002081 9
## 39 0.5816 0.002233 0.002074 0.5812 0.002233 0.002074 9
## 40 0.6406 0.003210 0.003016 0.6402 0.003209 0.003016 9
## 41 0.9316 0.002843 0.002155 0.9305 0.002841 0.002155 9
## 42 0.7909 0.001256 0.0007607 0.7900 0.001255 0.0007607 9
## 43 0.6286 0.005384 0.005071 0.6278 0.005384 0.005071 9
## 44 0.2665 0.004747 0.004691 0.2662 0.004747 0.004691 9
## 45 0.4401 0.003957 0.003803 0.4396 0.003957 0.003803 9
## 46 0.4516 0.005106 0.004945 0.4511 0.005106 0.004945 9
## 47 0.5806 0.004514 0.004247 0.5799 0.004514 0.004247 9
## 48 0.6096 0.003794 0.003499 0.6088 0.003793 0.003499 9
## 49 0.3132 0.003564 0.003487 0.3128 0.003564 0.003487 9
## 50 0.4000 0.005198 0.005071 0.3995 0.005198 0.005071 9
## 51 0.5059 0.002924 0.002674 0.5052 0.002924 0.002674 9
## 52 0.4328 0.001127 0.0009438 0.4322 0.001127 0.0009438 9
## 53 0.4792 0.006516 0.006292 0.4784 0.006516 0.006292 9
## 54 0.06787 0.005824 0.005820 0.06777 0.005824 0.005820 9
## 55 0.1314 0.004736 0.004719 0.1312 0.004736 0.004719 9
## 56 0.2297 0.006186 0.006134 0.2294 0.006186 0.006134 9
## 57 0.3090 0.005363 0.005269 0.3086 0.005363 0.005269 9
## 58 0.3164 0.004439 0.004341 0.3160 0.004439 0.004341 9
## 59 0.2165 0.004371 0.004326 0.2162 0.004371 0.004326 9
## 60 0.1993 0.006331 0.006292 0.1990 0.006330 0.006292 9
## 61 0.5669 0.003522 0.003151 0.5659 0.003521 0.003151 9
## 62 0.4574 0.001354 0.001112 0.4566 0.001353 0.001112 9
## 63 0.4714 0.007672 0.007415 0.4706 0.007671 0.007415 9
## 64 0.3515 0.007002 0.006859 0.3509 0.007001 0.006859 9
## 65 0.3673 0.005717 0.005561 0.3666 0.005716 0.005561 9
## 66 0.4145 0.007428 0.007230 0.4137 0.007427 0.007230 9
## 67 0.3915 0.006387 0.006210 0.3908 0.006386 0.006210 9
## 68 0.2381 0.005182 0.005116 0.2377 0.005182 0.005116 9
## 69 0.08525 0.005106 0.005098 0.08510 0.005106 0.005098 9
## 70 0.1834 0.007454 0.007415 0.1831 0.007454 0.007415 9
## 71 0.5959 0.003981 0.003524 0.5948 0.003979 0.003524 9
## 72 0.4416 0.001495 0.001244 0.4407 0.001494 0.001244 9
## 73 0.5660 0.008703 0.008291 0.5649 0.008702 0.008291 9
## 74 0.4677 0.007951 0.007669 0.4668 0.007950 0.007669 9
## 75 0.4696 0.006502 0.006218 0.4687 0.006501 0.006218 9
## 76 0.5260 0.008440 0.008083 0.5249 0.008438 0.008083 9
## 77 0.6144 0.007430 0.006943 0.6132 0.007428 0.006943 9
## 78 0.4214 0.005949 0.005721 0.4206 0.005949 0.005721 9
## 79 0.2889 0.005807 0.005700 0.2884 0.005807 0.005700 9
## 80 0.2518 0.008372 0.008291 0.2513 0.008372 0.008291 9
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 2 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 3 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 4 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 5 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 6 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 7 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 8 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 9 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 10 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 11 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 12 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 13 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 14 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 15 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 16 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 17 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 18 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 19 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 20 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 21 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 22 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 23 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 24 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 25 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 26 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 27 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 28 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 29 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 30 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 31 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 32 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 33 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 34 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 35 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 36 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 37 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 38 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 39 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 40 From study (p. 3338) 0.1 Imputed 1 0.974 1017. 0.9993
## 41 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 42 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 43 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 44 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 45 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 46 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 47 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 48 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 49 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 50 From study (p. 3338) 0.1 Imputed 1 0.974 604.4 0.9988
## 51 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 52 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 53 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 54 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 55 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 56 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 57 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 58 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 59 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 60 From study (p. 3338) 0.1 Imputed 1 0.976 488.0 0.9985
## 61 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 62 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 63 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 64 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 65 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 66 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 67 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 68 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 69 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 70 From study (p. 3338) 0.1 Imputed 1 0.975 413.5 0.9982
## 71 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 72 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 73 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 74 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 75 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 76 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 77 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 78 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 79 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## 80 From study (p. 3338) 0.1 Imputed 1 0.975 370.2 0.9980
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5189 0.005234 0.005101 0.5958 0.001910 0.001734 0.4424 0.0009879
## 2 0.4495 0.005201 0.005101 0.4816 0.0007267 0.0006121 0.5942 0.0009879
## 3 0.3305 0.005155 0.005101 0.3856 0.004154 0.004081 0.1892 0.0009879
## 4 0.1276 0.005109 0.005101 0.1595 0.003787 0.003775 0.08156 0.0009879
## 5 0.2871 0.005142 0.005101 0.3190 0.003111 0.003061 0.1808 0.0009879
## 6 0.2593 0.005134 0.005101 0.3242 0.004031 0.003979 0.1612 0.0009879
## 7 0.3209 0.005152 0.005101 0.3850 0.003491 0.003418 0.2063 0.0009879
## 8 0.3696 0.005169 0.005101 0.3696 0.002883 0.002816 0.2181 0.0009879
## 9 0.1216 0.005108 0.005101 0.1216 0.002813 0.002806 0.07214 0.0009879
## 10 0.2678 0.005137 0.005101 0.1964 0.004100 0.004081 0.09656 0.0009879
## 11 0.2644 0.005136 0.005101 0.3400 0.001791 0.001734 0.2552 0.0009879
## 12 0.2824 0.005140 0.005101 0.3137 0.0006607 0.0006121 0.3935 0.0009879
## 13 0.2433 0.005130 0.005101 0.2995 0.004125 0.004081 0.1471 0.0009879
## 14 0.09733 0.005106 0.005101 0.1298 0.003783 0.003775 0.06636 0.0009879
## 15 0.09725 0.005106 0.005101 0.1297 0.003069 0.003061 0.07364 0.0009879
## 16 0.1256 0.005109 0.005101 0.1884 0.003996 0.003979 0.09380 0.0009879
## 17 0.1449 0.005111 0.005101 0.2071 0.003439 0.003418 0.1112 0.0009879
## 18 0.1922 0.005119 0.005101 0.1922 0.002834 0.002816 0.1137 0.0009879
## 19 0.08463 0.005105 0.005101 0.08463 0.002809 0.002806 0.05021 0.0009879
## 20 0.1557 0.005113 0.005101 0.07786 0.004084 0.004081 0.03830 0.0009879
## 21 0.3150 0.005150 0.005101 0.3891 0.001809 0.001734 0.2916 0.0009879
## 22 0.2957 0.005144 0.005101 0.3269 0.0006649 0.0006121 0.4095 0.0009879
## 23 0.2321 0.005128 0.005101 0.2857 0.004121 0.004081 0.1403 0.0009879
## 24 0.1979 0.005120 0.005101 0.2309 0.003801 0.003775 0.1180 0.0009879
## 25 0.2162 0.005124 0.005101 0.2471 0.003091 0.003061 0.1402 0.0009879
## 26 0.2780 0.005139 0.005101 0.3398 0.004036 0.003979 0.1689 0.0009879
## 27 0.1531 0.005113 0.005101 0.2187 0.003441 0.003418 0.1174 0.0009879
## 28 0.1517 0.005112 0.005101 0.1517 0.002827 0.002816 0.08979 0.0009879
## 29 0.08263 0.005104 0.005101 0.08263 0.002809 0.002806 0.04902 0.0009879
## 30 0.1217 0.005108 0.005101 0.04055 0.004082 0.004081 0.01995 0.0009879
## 31 0.2980 0.005145 0.005101 0.3681 0.001801 0.001734 0.2760 0.0009879
## 32 0.2551 0.005133 0.005101 0.2870 0.0006528 0.0006121 0.3607 0.0009879
## 33 0.2259 0.005126 0.005101 0.2781 0.004119 0.004081 0.1366 0.0009879
## 34 0.2096 0.005123 0.005101 0.2395 0.003803 0.003775 0.1224 0.0009879
## 35 0.2576 0.005134 0.005101 0.2863 0.003101 0.003061 0.1623 0.0009879
## 36 0.2994 0.005145 0.005101 0.3593 0.004043 0.003979 0.1786 0.0009879
## 37 0.4117 0.005185 0.005101 0.4679 0.003526 0.003418 0.2503 0.0009879
## 38 0.4542 0.005203 0.005101 0.4542 0.002918 0.002816 0.2674 0.0009879
## 39 0.5661 0.005259 0.005101 0.5661 0.002964 0.002806 0.3328 0.0009879
## 40 0.6991 0.005342 0.005101 0.6235 0.004273 0.004081 0.3044 0.0009879
## 41 0.8275 0.009134 0.008564 0.9063 0.003595 0.002912 0.6606 0.001663
## 42 0.7367 0.009015 0.008564 0.7694 0.001520 0.001028 0.9138 0.001663
## 43 0.5559 0.008821 0.008564 0.6115 0.007162 0.006851 0.2990 0.001663
## 44 0.2268 0.008607 0.008564 0.2593 0.006393 0.006338 0.1326 0.001663
## 45 0.3952 0.008694 0.008564 0.4281 0.005291 0.005139 0.2424 0.001663
## 46 0.3766 0.008682 0.008564 0.4393 0.006841 0.006680 0.2183 0.001663
## 47 0.5021 0.008774 0.008564 0.5648 0.006003 0.005738 0.3018 0.001663
## 48 0.5930 0.008857 0.008564 0.5930 0.005020 0.004727 0.3482 0.001663
## 49 0.3047 0.008641 0.008564 0.3047 0.004788 0.004710 0.1806 0.001663
## 50 0.4710 0.008749 0.008564 0.3891 0.006977 0.006851 0.1911 0.001663
## 51 0.4172 0.01055 0.01037 0.4930 0.003777 0.003527 0.3725 0.002060
## 52 0.3906 0.01053 0.01037 0.4218 0.001428 0.001245 0.5301 0.002060
## 53 0.4109 0.01055 0.01037 0.4669 0.008523 0.008299 0.2316 0.002060
## 54 0.03307 0.01037 0.01037 0.06614 0.007681 0.007676 0.03426 0.002060
## 55 0.09606 0.01038 0.01037 0.1281 0.006241 0.006224 0.07365 0.002060
## 56 0.1599 0.01040 0.01037 0.2239 0.008143 0.008091 0.1128 0.002060
## 57 0.2409 0.01043 0.01037 0.3012 0.007044 0.006950 0.1636 0.002060
## 58 0.3084 0.01047 0.01037 0.3084 0.005824 0.005726 0.1844 0.002060
## 59 0.2110 0.01042 0.01037 0.2110 0.005751 0.005705 0.1266 0.002060
## 60 0.2719 0.01045 0.01037 0.1942 0.008338 0.008299 0.09669 0.002060
## 61 0.4782 0.01255 0.01227 0.5517 0.004542 0.004172 0.4152 0.002431
## 62 0.4144 0.01248 0.01227 0.4451 0.001714 0.001473 0.5574 0.002431
## 63 0.4059 0.01247 0.01227 0.4588 0.01007 0.009817 0.2273 0.002431
## 64 0.3078 0.01239 0.01227 0.3421 0.009223 0.009081 0.1765 0.002431
## 65 0.3249 0.01240 0.01227 0.3574 0.007518 0.007363 0.2047 0.002431
## 66 0.3361 0.01241 0.01227 0.4034 0.009770 0.009572 0.2026 0.002431
## 67 0.3209 0.01240 0.01227 0.3810 0.008399 0.008222 0.2065 0.002431
## 68 0.2317 0.01234 0.01227 0.2317 0.006839 0.006774 0.1386 0.002431
## 69 0.08297 0.01228 0.01227 0.08297 0.006758 0.006750 0.04979 0.002431
## 70 0.2578 0.01235 0.01227 0.1785 0.009856 0.009817 0.08878 0.002431
## 71 0.5096 0.01401 0.01366 0.5799 0.005101 0.004644 0.4365 0.002716
## 72 0.3990 0.01387 0.01366 0.4297 0.001890 0.001639 0.5399 0.002716
## 73 0.4991 0.01400 0.01366 0.5507 0.01134 0.01093 0.2729 0.002716
## 74 0.4226 0.01390 0.01366 0.4551 0.01039 0.01011 0.2348 0.002716
## 75 0.4265 0.01391 0.01366 0.4569 0.008479 0.008195 0.2615 0.002716
## 76 0.4478 0.01393 0.01366 0.5118 0.01101 0.01065 0.2570 0.002716
## 77 0.5418 0.01406 0.01366 0.5978 0.009637 0.009151 0.3229 0.002716
## 78 0.4101 0.01389 0.01366 0.4101 0.007768 0.007540 0.2449 0.002716
## 79 0.2811 0.01377 0.01366 0.2811 0.007620 0.007512 0.1686 0.002716
## 80 0.3204 0.01380 0.01366 0.2450 0.01101 0.01093 0.1220 0.002716
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <chr> <dbl>
## 1 1012. 1012. 1 eta 1.353
## 2 1012. 1012. 1 eta 1.353
## 3 1012. 1012. 1 eta 1.353
## 4 1012. 1012. 1 eta 1.353
## 5 1012. 1012. 1 eta 1.353
## 6 1012. 1012. 1 eta 1.353
## 7 1012. 1012. 1 eta 1.353
## 8 1012. 1012. 1 eta 1.353
## 9 1012. 1012. 1 eta 1.353
## 10 1012. 1012. 1 eta 1.353
## 11 1012. 1012. 1 eta 1.353
## 12 1012. 1012. 1 eta 1.353
## 13 1012. 1012. 1 eta 1.353
## 14 1012. 1012. 1 eta 1.353
## 15 1012. 1012. 1 eta 1.353
## 16 1012. 1012. 1 eta 1.353
## 17 1012. 1012. 1 eta 1.353
## 18 1012. 1012. 1 eta 1.353
## 19 1012. 1012. 1 eta 1.353
## 20 1012. 1012. 1 eta 1.353
## 21 1012. 1012. 1 eta 1.353
## 22 1012. 1012. 1 eta 1.353
## 23 1012. 1012. 1 eta 1.353
## 24 1012. 1012. 1 eta 1.353
## 25 1012. 1012. 1 eta 1.353
## 26 1012. 1012. 1 eta 1.353
## 27 1012. 1012. 1 eta 1.353
## 28 1012. 1012. 1 eta 1.353
## 29 1012. 1012. 1 eta 1.353
## 30 1012. 1012. 1 eta 1.353
## 31 1012. 1012. 1 eta 1.353
## 32 1012. 1012. 1 eta 1.353
## 33 1012. 1012. 1 eta 1.353
## 34 1012. 1012. 1 eta 1.353
## 35 1012. 1012. 1 eta 1.353
## 36 1012. 1012. 1 eta 1.353
## 37 1012. 1012. 1 eta 1.353
## 38 1012. 1012. 1 eta 1.353
## 39 1012. 1012. 1 eta 1.353
## 40 1012. 1012. 1 eta 1.353
## 41 601.3 601.3 1 eta 1.351
## 42 601.3 601.3 1 eta 1.351
## 43 601.3 601.3 1 eta 1.351
## 44 601.3 601.3 1 eta 1.351
## 45 601.3 601.3 1 eta 1.351
## 46 601.3 601.3 1 eta 1.351
## 47 601.3 601.3 1 eta 1.351
## 48 601.3 601.3 1 eta 1.351
## 49 601.3 601.3 1 eta 1.351
## 50 601.3 601.3 1 eta 1.351
## 51 485.4 485.4 1 eta 1.319
## 52 485.4 485.4 1 eta 1.319
## 53 485.4 485.4 1 eta 1.319
## 54 485.4 485.4 1 eta 1.319
## 55 485.4 485.4 1 eta 1.319
## 56 485.4 485.4 1 eta 1.319
## 57 485.4 485.4 1 eta 1.319
## 58 485.4 485.4 1 eta 1.319
## 59 485.4 485.4 1 eta 1.319
## 60 485.4 485.4 1 eta 1.319
## 61 411.3 411.3 1 eta 1.324
## 62 411.3 411.3 1 eta 1.324
## 63 411.3 411.3 1 eta 1.324
## 64 411.3 411.3 1 eta 1.324
## 65 411.3 411.3 1 eta 1.324
## 66 411.3 411.3 1 eta 1.324
## 67 411.3 411.3 1 eta 1.324
## 68 411.3 411.3 1 eta 1.324
## 69 411.3 411.3 1 eta 1.324
## 70 411.3 411.3 1 eta 1.324
## 71 368.2 368.2 1 eta 1.318
## 72 368.2 368.2 1 eta 1.318
## 73 368.2 368.2 1 eta 1.318
## 74 368.2 368.2 1 eta 1.318
## 75 368.2 368.2 1 eta 1.318
## 76 368.2 368.2 1 eta 1.318
## 77 368.2 368.2 1 eta 1.318
## 78 368.2 368.2 1 eta 1.318
## 79 368.2 368.2 1 eta 1.318
## 80 368.2 368.2 1 eta 1.318
## vary_id
## <chr>
## 1 ITT/GAD-7/Post
## 2 ITT/PHQ-9/Post
## 3 ITT/PHQ15/Post
## 4 ITT/working_life_Function/Post
## 5 ITT/Socal_life_Function/Post
## 6 ITT/Family_life_Function/Post
## 7 ITT/Physical_QoL/Post
## 8 ITT/Psychological_QoL/Post
## 9 ITT/Social_QoL/Post
## 10 ITT/Environment_QoL/Post
## 11 ITT/GAD-7/3m
## 12 ITT/PHQ-9/3m
## 13 ITT/PHQ15/3m
## 14 ITT/working_life_Function/3m
## 15 ITT/Socal_life_Function/3m
## 16 ITT/Family_life_Function/3m
## 17 ITT/Physical_QoL/3m
## 18 ITT/Psychological_QoL/3m
## 19 ITT/Social_QoL/3m
## 20 ITT/Environment_QoL/3m
## 21 ITT/GAD-7/6m
## 22 ITT/PHQ-9/6m
## 23 ITT/PHQ15/6m
## 24 ITT/working_life_Function/6m
## 25 ITT/Socal_life_Function/6m
## 26 ITT/Family_life_Function/6m
## 27 ITT/Physical_QoL/6m
## 28 ITT/Psychological_QoL/6m
## 29 ITT/Social_QoL/6m
## 30 ITT/Environment_QoL/6m
## 31 ITT/GAD-7/12m
## 32 ITT/PHQ-9/12m
## 33 ITT/PHQ15/12m
## 34 ITT/working_life_Function/12m
## 35 ITT/Socal_life_Function/12m
## 36 ITT/Family_life_Function/12m
## 37 ITT/Physical_QoL/12m
## 38 ITT/Psychological_QoL/12m
## 39 ITT/Social_QoL/12m
## 40 ITT/Environment_QoL/12m
## 41 Per-protocol/GAD-7/Post
## 42 Per-protocol/PHQ-9/Post
## 43 Per-protocol/PHQ15/Post
## 44 Per-protocol/working_life_Function/Post
## 45 Per-protocol/Socal_life_Function/Post
## 46 Per-protocol/Family_life_Function/Post
## 47 Per-protocol/Physical_QoL/Post
## 48 Per-protocol/Psychological_QoL/Post
## 49 Per-protocol/Social_QoL/Post
## 50 Per-protocol/Environment_QoL/Post
## 51 Per-protocol/GAD-7/3m
## 52 Per-protocol/PHQ-9/3m
## 53 Per-protocol/PHQ15/3m
## 54 Per-protocol/working_life_Function/3m
## 55 Per-protocol/Socal_life_Function/3m
## 56 Per-protocol/Family_life_Function/3m
## 57 Per-protocol/Physical_QoL/3m
## 58 Per-protocol/Psychological_QoL/3m
## 59 Per-protocol/Social_QoL/3m
## 60 Per-protocol/Environment_QoL/3m
## 61 Per-protocol/GAD-7/6m
## 62 Per-protocol/PHQ-9/6m
## 63 Per-protocol/PHQ15/6m
## 64 Per-protocol/working_life_Function/6m
## 65 Per-protocol/Socal_life_Function/6m
## 66 Per-protocol/Family_life_Function/6m
## 67 Per-protocol/Physical_QoL/6m
## 68 Per-protocol/Psychological_QoL/6m
## 69 Per-protocol/Social_QoL/6m
## 70 Per-protocol/Environment_QoL/6m
## 71 Per-protocol/GAD-7/12m
## 72 Per-protocol/PHQ-9/12m
## 73 Per-protocol/PHQ15/12m
## 74 Per-protocol/working_life_Function/12m
## 75 Per-protocol/Socal_life_Function/12m
## 76 Per-protocol/Family_life_Function/12m
## 77 Per-protocol/Physical_QoL/12m
## 78 Per-protocol/Psychological_QoL/12m
## 79 Per-protocol/Social_QoL/12m
## 80 Per-protocol/Environment_QoL/12m
Entering data from Table 2 and Treatment Format \(\times\) Time interaction estimate from text results reported on pages 307-08
Craigie2009 <- tibble(
analysis = rep(c(
"ITT",
"Completers"), each = 6),
outcome = rep(c(
"BDI_II",
"BAI",
"Q_LES_Q"), each = 2,2),
group = rep(c(
"Individual",
"Group"), each = 1, 6),
N = c(rep(c(116, 240), 3),
rep(c(77, 157), 3)
),
N_start = rep(c(116, 240), 6),
# pre-treatment means
m_pre = c(
# Intention to treat
30.0, 31.3, # BDI-II
21.1, 20.2, # BAI
43.2, 42.3, # Q-LES-Q
# Completers (treatment-on-treated)
30.8, 30.7,
20.7, 19.6,
46.4, 42.9
),
# pre-treatment standard deviation
sd_pre = c(
# Intention to treat
10.4, 11.2,
12.2, 11.3,
14.7, 14.1,
# Completers (treatment-on-treated)
10.3, 11.1,
12.0, 11.0,
13.5, 13.8
),
# post-treatment means
m_post = c(
# Intention to treat
16.3, 20.9,
12.9, 15.6,
52.3, 50.8,
# Completers (treatment-on-treated)
11.7, 17.7,
9.2, 13.7,
62.7, 55.3
),
# post-treatment means
sd_post = c(
# Intention to treat
12.2, 13.6,
11.2, 11.4,
19.9, 17.9,
# Completers (treatment-on-treated)
9.9, 12.4,
8.3, 10.7,
14.7, 15.8
),
F_within = c(
129.79, 187.21,
64.96, 56.00,
42.27, 79.70,
192.23, 200.75,
86.27, 61.57,
62.45, 101.19
),
# From Wilson (2016) Eq 31.
r = ((sd_pre^2*F_within + sd_post^2*F_within) -
(m_post-m_pre)^2 * N)/ (2 * sd_pre*sd_post*F_within),
# For pooling of correlation coefficients
z = 0.5 * log( (1+r)/(1-r) ),
v = 1/(N-3),
w = 1/v
)
Effect size calculation
# Calculating preposttest-correlations across groups
ppcors_Craigie2009 <-
Craigie2009 |>
summarise(
mean_z = sum(w*z)/sum(w),
ppcor = (exp(2*mean_z)-1)/(exp(2*mean_z)+1),
ppcor_method = "F_values used, but calcuable from study",
.by = c(analysis, outcome)
)
ppcors_Craigie2009
## # A tibble: 6 × 5
## analysis outcome mean_z ppcor ppcor_method
## <chr> <chr> <dbl> <dbl> <chr>
## 1 ITT BDI_II 0.5508 0.5012 F_values used, but calcuable from study
## 2 ITT BAI 0.7290 0.6225 F_values used, but calcuable from study
## 3 ITT Q_LES_Q 0.7215 0.6179 F_values used, but calcuable from study
## 4 Completers BDI_II 0.4897 0.4540 F_values used, but calcuable from study
## 5 Completers BAI 0.6615 0.5793 F_values used, but calcuable from study
## 6 Completers Q_LES_Q 0.3962 0.3767 F_values used, but calcuable from study
Craigie2009_est <-
Craigie2009 |>
mutate(group = case_match(group, "Group" ~ "t", "Individual" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
left_join(ppcors_Craigie2009, by = join_by(analysis, outcome)) |>
mutate(
analysis_plan = rep(c("All mental health outcomes/Depression", "All mental health outcomes/Anxiety",
"Wellbeing and Quality of Life"), 2),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Craigie & Nathan 2009",
main_es_method = "Raw diff-in-diffs",
#ppcor_calc_method = "Not relevant - F_values used",
F_val = c(
5.96, 9.84, 0.17, # (entered from p. 307 left side bottom)
13.86, 16.93, 2.74 # (entered from p. 308 right side top)
),
N_total = N_t + N_c,
df_ind = N_total,
# Calculate d post
m_post = if_else(outcome == "Q_LES_Q", m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Account for the fact that some outcomes are on different scales
m_diff_t = if_else(outcome == "Q_LES_Q", m_post_t - m_pre_t, (m_post_t - m_pre_t) * -1),
m_diff_c = if_else(outcome == "Q_LES_Q", m_post_c - m_pre_c, (m_post_c - m_pre_c) * -1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = d_DD^2/F_val + d_DD^2/(2*df_ind),
Wd_DD = d_DD^2/F_val,
g_DD = J * d_DD,
vg_DD = g_DD^2/F_val + g_DD^2/(2*df_ind),
Wg_DD = g_DD^2/F_val
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# "groups consisted of between 5 to 12 patients" p. 306
avg_cl_size = 8.5,
avg_cl_type = "From study (p. 305)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = vgt_post:Wgt_post
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste0(analysis, "/", outcome)
) |>
ungroup(); Craigie2009_est
## # A tibble: 6 × 74
## analysis outcome N_c N_t N_start_c N_start_t m_pre_c m_pre_t sd_pre_c
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 ITT BDI_II 116 240 116 240 30 31.3 10.4
## 2 ITT BAI 116 240 116 240 21.1 20.2 12.2
## 3 ITT Q_LES_Q 116 240 116 240 43.2 42.3 14.7
## 4 Completers BDI_II 77 157 116 240 30.8 30.7 10.3
## 5 Completers BAI 77 157 116 240 20.7 19.6 12
## 6 Completers Q_LES_Q 77 157 116 240 46.4 42.9 13.5
## sd_pre_t m_post_c m_post_t sd_post_c sd_post_t F_within_c F_within_t r_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11.2 16.3 20.9 12.2 13.6 129.8 187.2 0.3517
## 2 11.3 12.9 15.6 11.2 11.4 64.96 56 0.5643
## 3 14.1 52.3 50.8 19.9 17.9 42.27 79.7 0.6578
## 4 11.1 11.7 17.7 9.9 12.4 192.2 200.8 0.2843
## 5 11 9.2 13.7 8.3 10.7 86.27 61.57 0.4762
## 6 13.8 62.7 55.3 14.7 15.8 62.45 101.2 0.1783
## r_t z_c z_t v_c v_t w_c w_t mean_z ppcor
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5637 0.3674 0.6383 0.008850 0.004219 113 237 0.5508 0.5012
## 2 0.6481 0.6391 0.7719 0.008850 0.004219 113 237 0.7290 0.6225
## 3 0.5976 0.7889 0.6894 0.008850 0.004219 113 237 0.7215 0.6179
## 4 0.5260 0.2923 0.5846 0.01351 0.006494 74 154 0.4897 0.4540
## 5 0.6233 0.5180 0.7304 0.01351 0.006494 74 154 0.6615 0.5793
## 6 0.4621 0.1802 0.5000 0.01351 0.006494 74 154 0.3962 0.3767
## ppcor_method analysis_plan
## <chr> <chr>
## 1 F_values used, but calcuable from study All mental health outcomes/Depression
## 2 F_values used, but calcuable from study All mental health outcomes/Anxiety
## 3 F_values used, but calcuable from study Wellbeing and Quality of Life
## 4 F_values used, but calcuable from study All mental health outcomes/Depression
## 5 F_values used, but calcuable from study All mental health outcomes/Anxiety
## 6 F_values used, but calcuable from study Wellbeing and Quality of Life
## effect_size sd_used study main_es_method F_val
## <chr> <chr> <chr> <chr> <dbl>
## 1 SMD Pooled posttest SD Craigie & Nathan 2009 Raw diff-in-diffs 5.96
## 2 SMD Pooled posttest SD Craigie & Nathan 2009 Raw diff-in-diffs 9.84
## 3 SMD Pooled posttest SD Craigie & Nathan 2009 Raw diff-in-diffs 0.17
## 4 SMD Pooled posttest SD Craigie & Nathan 2009 Raw diff-in-diffs 13.86
## 5 SMD Pooled posttest SD Craigie & Nathan 2009 Raw diff-in-diffs 16.93
## 6 SMD Pooled posttest SD Craigie & Nathan 2009 Raw diff-in-diffs 2.74
## N_total df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 356 356 -4.6 13.16 -0.3495 0.01296 0.01279 0.9979 -0.3488 0.01296
## 2 356 356 -2.7 11.34 -0.2382 0.01287 0.01279 0.9979 -0.2377 0.01287
## 3 356 356 -1.5 18.57 -0.08076 0.01280 0.01279 0.9979 -0.08059 0.01280
## 4 234 234 -6 11.64 -0.5154 0.01992 0.01936 0.9968 -0.5138 0.01992
## 5 234 234 -4.5 9.978 -0.4510 0.01979 0.01936 0.9968 -0.4496 0.01979
## 6 234 234 -7.400 15.45 -0.4790 0.01985 0.01936 0.9968 -0.4775 0.01984
## Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.01279 10.4 13.7 -0.2507 0.01064 0.01055 -0.2502 0.01059
## 2 0.01279 4.6 8.2 -0.3176 0.01039 0.01025 -0.3169 0.01035
## 3 0.01279 8.5 9.100 -0.03230 0.006140 0.006139 -0.03224 0.006114
## 4 0.01936 13 19.1 -0.5240 0.02040 0.01981 -0.5224 0.02027
## 5 0.01936 5.9 11.5 -0.5613 0.01928 0.01861 -0.5595 0.01916
## 6 0.01936 12.4 16.3 -0.2525 0.02340 0.02326 -0.2516 0.02325
## Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates
## <dbl> <dbl> <chr> <dbl> <chr> <dbl>
## 1 0.01050 8.5 From study (p. 305) 0.1 Imputed 1
## 2 0.01021 8.5 From study (p. 305) 0.1 Imputed 1
## 3 0.006113 8.5 From study (p. 305) 0.1 Imputed 1
## 4 0.01969 8.5 From study (p. 305) 0.1 Imputed 1
## 5 0.01849 8.5 From study (p. 305) 0.1 Imputed 1
## 6 0.02311 8.5 From study (p. 305) 0.1 Imputed 1
## gamma_sqrt df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.983 336.6 0.9978 -0.3428 0.01523 0.01505 -0.2459 0.01203 0.01194
## 2 0.983 336.6 0.9978 -0.2336 0.01513 0.01505 -0.3115 0.01175 0.01161
## 3 0.983 336.6 0.9978 -0.07921 0.01506 0.01505 -0.03168 0.006952 0.006951
## 4 0.982 220.8 0.9966 -0.5045 0.02342 0.02284 -0.5129 0.02299 0.02239
## 5 0.982 220.8 0.9966 -0.4414 0.02328 0.02284 -0.5493 0.02171 0.02103
## 6 0.982 220.8 0.9966 -0.4688 0.02334 0.02284 -0.2471 0.02643 0.02629
## hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 -0.1227 0.002980 335.5 335.5 1 eta 1.177
## 2 -0.1575 0.002980 335.5 335.5 1 eta 1.177
## 3 -0.02075 0.002980 335.5 335.5 1 eta 1.177
## 4 -0.2300 0.004544 220.1 220.1 1 eta 1.18
## 5 -0.2540 0.004544 220.1 220.1 1 eta 1.18
## 6 -0.1026 0.004544 220.1 220.1 1 eta 1.18
## vary_id
## <chr>
## 1 ITT/BDI_II
## 2 ITT/BAI
## 3 ITT/Q_LES_Q
## 4 Completers/BDI_II
## 5 Completers/BAI
## 6 Completers/Q_LES_Q
Entering data from Table 2 (p. 7)
Crawford2012 <-
tibble(
outcome = rep(
c(
"Global assessment of functioning (GAF)", "Positive and negative syndrome scale",
# "Positive symptoms score", "Negative symptoms score", "General symptoms score",
"Social functioning", "Wellbeing"
# "Satisfaction with care", "Morisky score"
),
each = 6),
group = rep(rep(c("Standard care", "Activity groups", "Art therapy"), 2), n_distinct(outcome)),
timing = rep(rep(c(12, 24), each = n_distinct(group)), n_distinct(outcome)),
N_start = rep(rep(c(137, 140, 140), 2), n_distinct(outcome)),
N = rep(c(121, 121, 119, 117, 121, 117), n_distinct(outcome)),
m_pre = c(
rep(c(44.9, 45.0, 44.8), 2),
rep(c(72.6, 75.3, 74.3), 2),
#rep(c(17.3, 18.2, 18), 2),
#rep(c(18.5, 18.7, 18.7), 2),
#rep(c(36.8, 37.6, 37.6), 2),
rep(c(8.1, 9., 8.6), 2),
rep(c(64.5, 59.1, 58.3), 2)
#rep(c(24.9, 23.8, 24.8), 2),
#rep(c(1.2, 1.2, 1.0), 2)
),
sd_pre = c(
rep(c(12.6, 12.7, 13.1), 2),
rep(c(21.5, 22., 23.7), 2),
#rep(c(5.6, 6.8, 6.9), 2),
#rep(c(7.5, 7., 7.1), 2),
#rep(c(11.3, 12.5, 12.5), 2),
rep(c(4.7, 4.8, 4.2), 2),
rep(c(20.6, 19.5, 21.1), 2)
#rep(c(5.7, 6.2, 5.7), 2),
#rep(c(1.3, 1.3, 1.2), 2)
),
m_post = c(
45.7, 45.5, 44.9, # GLobal assessment of functioning 12 month
46.8, 46.4, 45.6, # GLobal assessment of functioning 24 month
71.2, 69.6, 72.7, # Positive and negative syndrome scale 12 m
68.1, 66.9, 69.2, # Positive and negative syndrome scale 24 m
#16.7, 16.1, 17.3, # Positive symptoms score 12m
#16.1, 15.6, 16.8, # Positive symptoms score 24m
#
#18.2, 17.3, 18.4, # Negative symptoms score 12m
#17.2, 16.4, 16.9, # Negative symptoms score 24m
#
#36.3, 35.9, 37, # General symptoms score 12m
#34.9, 34.9, 35.3, # General symptoms score 24m
8.5, 8.1, 8.3, # Social functioning 12m
8.1, 8, 8.2, # Social functioning 24m
64.1, 63.6, 59.6, # Wellbeing 12m
68.1, 66.1, 65.1 # Wellbeing 24m
#24.3, 25., 23.6, # Satisfaction with care 12m
#24.2, 24.9, 23.1, # Satisfaction with care 24m
#0.7, 0.6, 0.7, # Morisky score 12m
#0.6, 0.5, 0.6 # Morisky score 24m
),
sd_post = c(
14.4, 14.1, 14.6,
12.8, 13.6, 13.1,
24.6, 23.2, 27.3,
20.7, 23.3, 21.8,
#6.3, 5.9, 7.6,
#5.5, 6.4, 6.5,
#
#7.7, 7.2, 8,
#7.3, 6.8, 7.1,
#
#13, 12.7, 14,
#11.3, 12.4, 11.4,
4.9, 4.6, 5.,
4.8, 4.5, 4.8,
23.7, 23.2, 20.8,
18.8, 18.4, 18.6
#6.4, 5.2, 6.5,
#5.3, 5., 5.9,
#1.1, .9, 1.,
#.9, .9, .9
)
)
Crawford2012_act_wide <-
Crawford2012 |>
filter(!str_detect(group, "Art")) |>
mutate(group = case_match(group, "Activity groups" ~ "t", "Standard care" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) |>
mutate(
treatment = "Activity groups"
) |>
relocate(treatment)
Crawford2012_art_wide <-
Crawford2012 |>
filter(!str_detect(group, "Act")) |>
mutate(group = case_match(group, "Art therapy" ~ "t", "Standard care" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) |>
mutate(
treatment = "Art therapy"
) |>
relocate(treatment)
Crawford2012_est <-
bind_rows(Crawford2012_act_wide, Crawford2012_art_wide) |>
arrange(outcome, timing) |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "Positive") ~ "All mental health outcomes/Symptoms of psychosis",
str_detect(outcome, "function") ~ "Social functioning (degree of impairment)",
outcome == "Wellbeing" ~ "Wellbeing and Quality of Life",
TRUE ~ NA_character_
),
N_total = N_t + N_c,
df_ind = N_total,
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Crawford et al. 2012",
main_es_method = "Raw diff-in-diffs",
ppcor = ppcor_imp,
ppcor_method = "Imputed",
m_post = if_else(!str_detect(outcome, "Positive"), m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
m_diff_t = if_else(outcome != "medication_adherence", m_post_t - m_pre_t, (m_post_t - m_pre_t) * -1),
m_diff_c = if_else(outcome != "medication_adherence", m_post_c - m_pre_c, (m_post_c - m_pre_c) * -1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c)
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# "Art therapy and activity groups had up to eight members
avg_cl_size = 8,
avg_cl_type = "From study (p. 1)",
# Icc value
icc = case_when(
str_detect(outcome, "Global") & timing == 12 ~ 0.175,
str_detect(outcome, "Global") & timing == 24 ~ 0.06,
str_detect(outcome, "Positive") ~ 0.47,
str_detect(outcome, "Social|Wellbeing") ~ ICC_01,
TRUE ~ NA_real_
),
icc_type = case_when(
str_detect(outcome, "Global|Positive") ~ "From study (p. 3)",
str_detect(outcome, "Social|Wellbeing") ~ "Imputed",
TRUE ~ NA_character_
),
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = vgt_post:Wgt_post
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
gt_DD_pop = if_else(
str_detect(outcome, "GAF"),
omega * ((m_diff_t - m_diff_c)/GAF_pop_res$sd_population_GAF) * gamma_sqrt,
NA_real_
),
# Calculated from Eq. 28 (Fitzgerald & Tipton, 2024)
vgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD) + g_DD^2/(2*GAF_pop_res$df_pop),
NA_real_
),
Wgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD),
NA_real_
),
vary_id = paste(outcome, timing, treatment, sep = "/"),
timing = as.character(timing)
) |>
ungroup(); Crawford2012_est
## # A tibble: 16 × 66
## treatment outcome timing N_start_c
## <chr> <chr> <chr> <dbl>
## 1 Activity groups Global assessment of functioning (GAF) 12 137
## 2 Art therapy Global assessment of functioning (GAF) 12 137
## 3 Activity groups Global assessment of functioning (GAF) 24 137
## 4 Art therapy Global assessment of functioning (GAF) 24 137
## 5 Activity groups Positive and negative syndrome scale 12 137
## 6 Art therapy Positive and negative syndrome scale 12 137
## 7 Activity groups Positive and negative syndrome scale 24 137
## 8 Art therapy Positive and negative syndrome scale 24 137
## 9 Activity groups Social functioning 12 137
## 10 Art therapy Social functioning 12 137
## 11 Activity groups Social functioning 24 137
## 12 Art therapy Social functioning 24 137
## 13 Activity groups Wellbeing 12 137
## 14 Art therapy Wellbeing 12 137
## 15 Activity groups Wellbeing 24 137
## 16 Art therapy Wellbeing 24 137
## N_start_t N_c N_t m_pre_c m_pre_t sd_pre_c sd_pre_t m_post_c m_post_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 140 121 121 44.9 45 12.6 12.7 45.7 45.5
## 2 140 121 119 44.9 44.8 12.6 13.1 45.7 44.9
## 3 140 117 121 44.9 45 12.6 12.7 46.8 46.4
## 4 140 117 117 44.9 44.8 12.6 13.1 46.8 45.6
## 5 140 121 121 72.6 75.3 21.5 22 71.2 69.6
## 6 140 121 119 72.6 74.3 21.5 23.7 71.2 72.7
## 7 140 117 121 72.6 75.3 21.5 22 68.1 66.9
## 8 140 117 117 72.6 74.3 21.5 23.7 68.1 69.2
## 9 140 121 121 8.1 9 4.7 4.8 8.5 8.1
## 10 140 121 119 8.1 8.6 4.7 4.2 8.5 8.3
## 11 140 117 121 8.1 9 4.7 4.8 8.1 8
## 12 140 117 117 8.1 8.6 4.7 4.2 8.1 8.2
## 13 140 121 121 64.5 59.1 20.6 19.5 64.1 63.6
## 14 140 121 119 64.5 58.3 20.6 21.1 64.1 59.6
## 15 140 117 121 64.5 59.1 20.6 19.5 68.1 66.1
## 16 140 117 117 64.5 58.3 20.6 21.1 68.1 65.1
## sd_post_c sd_post_t analysis_plan N_total
## <dbl> <dbl> <chr> <dbl>
## 1 14.4 14.1 Social functioning (degree of impairment) 242
## 2 14.4 14.6 Social functioning (degree of impairment) 240
## 3 12.8 13.6 Social functioning (degree of impairment) 238
## 4 12.8 13.1 Social functioning (degree of impairment) 234
## 5 24.6 23.2 All mental health outcomes/Symptoms of psychosis 242
## 6 24.6 27.3 All mental health outcomes/Symptoms of psychosis 240
## 7 20.7 23.3 All mental health outcomes/Symptoms of psychosis 238
## 8 20.7 21.8 All mental health outcomes/Symptoms of psychosis 234
## 9 4.9 4.6 Social functioning (degree of impairment) 242
## 10 4.9 5 Social functioning (degree of impairment) 240
## 11 4.8 4.5 Social functioning (degree of impairment) 238
## 12 4.8 4.8 Social functioning (degree of impairment) 234
## 13 23.7 23.2 Wellbeing and Quality of Life 242
## 14 23.7 20.8 Wellbeing and Quality of Life 240
## 15 18.8 18.4 Wellbeing and Quality of Life 238
## 16 18.8 18.6 Wellbeing and Quality of Life 234
## df_ind effect_size sd_used study main_es_method
## <dbl> <chr> <chr> <chr> <chr>
## 1 242 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 2 240 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 3 238 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 4 234 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 5 242 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 6 240 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 7 238 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 8 234 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 9 242 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 10 240 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 11 238 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 12 234 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 13 242 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 14 240 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 15 238 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## 16 234 SMD Pooled posttest SD Crawford et al. 2012 Raw diff-in-diffs
## ppcor ppcor_method m_post sd_pool d_post vd_post Wd_post J g_post
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5 Imputed -0.2000 14.25 -0.01403 0.01653 0.01653 0.9969 -0.01399
## 2 0.5 Imputed -0.8000 14.50 -0.05517 0.01667 0.01667 0.9969 -0.05500
## 3 0.5 Imputed -0.4000 13.21 -0.03027 0.01681 0.01681 0.9968 -0.03018
## 4 0.5 Imputed -1.200 12.95 -0.09266 0.01711 0.01709 0.9968 -0.09236
## 5 0.5 Imputed 1.600 23.91 0.06692 0.01654 0.01653 0.9969 0.06671
## 6 0.5 Imputed -1.5 25.97 -0.05775 0.01667 0.01667 0.9969 -0.05757
## 7 0.5 Imputed 1.200 22.06 0.05440 0.01682 0.01681 0.9968 0.05422
## 8 0.5 Imputed -1.100 21.26 -0.05175 0.01710 0.01709 0.9968 -0.05158
## 9 0.5 Imputed -0.4000 4.752 -0.08417 0.01654 0.01653 0.9969 -0.08391
## 10 0.5 Imputed -0.2000 4.950 -0.04041 0.01667 0.01667 0.9969 -0.04028
## 11 0.5 Imputed -0.1000 4.650 -0.02151 0.01681 0.01681 0.9968 -0.02144
## 12 0.5 Imputed 0.1000 4.8 0.02083 0.01709 0.01709 0.9968 0.02077
## 13 0.5 Imputed -0.5000 23.45 -0.02132 0.01653 0.01653 0.9969 -0.02125
## 14 0.5 Imputed -4.500 22.31 -0.2017 0.01675 0.01667 0.9969 -0.2011
## 15 0.5 Imputed -2 18.60 -0.1075 0.01684 0.01681 0.9968 -0.1072
## 16 0.5 Imputed -3 18.70 -0.1604 0.01715 0.01709 0.9968 -0.1599
## vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.01653 0.01653 0.5 0.8000 -0.02105 0.01653 0.01653 -0.02099 0.01653
## 2 0.01667 0.01667 0.1000 0.8000 -0.04828 0.01667 0.01667 -0.04813 0.01667
## 3 0.01681 0.01681 1.400 1.900 -0.03784 0.01681 0.01681 -0.03772 0.01681
## 4 0.01711 0.01709 0.8000 1.900 -0.08494 0.01711 0.01709 -0.08466 0.01711
## 5 0.01654 0.01653 -5.7 -1.400 -0.1798 0.01660 0.01653 -0.1793 0.01660
## 6 0.01667 0.01667 -1.600 -1.400 -0.007700 0.01667 0.01667 -0.007676 0.01667
## 7 0.01682 0.01681 -8.400 -4.5 -0.1768 0.01688 0.01681 -0.1762 0.01688
## 8 0.01710 0.01709 -5.100 -4.5 -0.02823 0.01710 0.01709 -0.02814 0.01710
## 9 0.01654 0.01653 -0.9 0.4000 -0.2735 0.01668 0.01653 -0.2727 0.01668
## 10 0.01667 0.01667 -0.3000 0.4000 -0.1414 0.01671 0.01667 -0.1410 0.01671
## 11 0.01681 0.01681 -1 0 -0.2151 0.01691 0.01681 -0.2144 0.01691
## 12 0.01709 0.01709 -0.4000 0 -0.08333 0.01711 0.01709 -0.08307 0.01711
## 13 0.01653 0.01653 4.5 -0.4000 0.2089 0.01662 0.01653 0.2083 0.01662
## 14 0.01675 0.01667 1.300 -0.4000 0.07620 0.01668 0.01667 0.07596 0.01668
## 15 0.01684 0.01681 7.000 3.600 0.1828 0.01688 0.01681 0.1822 0.01688
## 16 0.01715 0.01709 6.8 3.600 0.1711 0.01716 0.01709 0.1706 0.01716
## Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates
## <dbl> <dbl> <chr> <dbl> <chr> <dbl>
## 1 0.01653 8 From study (p. 1) 0.175 From study (p. 3) 1
## 2 0.01667 8 From study (p. 1) 0.175 From study (p. 3) 1
## 3 0.01681 8 From study (p. 1) 0.06 From study (p. 3) 1
## 4 0.01709 8 From study (p. 1) 0.06 From study (p. 3) 1
## 5 0.01653 8 From study (p. 1) 0.47 From study (p. 3) 1
## 6 0.01667 8 From study (p. 1) 0.47 From study (p. 3) 1
## 7 0.01681 8 From study (p. 1) 0.47 From study (p. 3) 1
## 8 0.01709 8 From study (p. 1) 0.47 From study (p. 3) 1
## 9 0.01653 8 From study (p. 1) 0.1 Imputed 1
## 10 0.01667 8 From study (p. 1) 0.1 Imputed 1
## 11 0.01681 8 From study (p. 1) 0.1 Imputed 1
## 12 0.01709 8 From study (p. 1) 0.1 Imputed 1
## 13 0.01653 8 From study (p. 1) 0.1 Imputed 1
## 14 0.01667 8 From study (p. 1) 0.1 Imputed 1
## 15 0.01681 8 From study (p. 1) 0.1 Imputed 1
## 16 0.01709 8 From study (p. 1) 0.1 Imputed 1
## gamma_sqrt df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.953 212.0 0.9965 -0.01333 0.02521 0.02521 -0.01999 0.02521 0.02521
## 2 0.952 210.4 0.9964 -0.05234 0.02552 0.02552 -0.04580 0.02552 0.02552
## 3 0.984 232.8 0.9968 -0.02969 0.01977 0.01977 -0.03712 0.01977 0.01977
## 4 0.984 228.9 0.9967 -0.09088 0.02019 0.02017 -0.08330 0.02019 0.02017
## 5 0.867 100.5 0.9925 0.05758 0.03985 0.03983 -0.1548 0.03995 0.03983
## 6 0.866 99.88 0.9925 -0.04964 0.04045 0.04044 -0.006618 0.04044 0.04044
## 7 0.869 98.52 0.9924 0.04691 0.03999 0.03998 -0.1525 0.04010 0.03998
## 8 0.866 97.22 0.9923 -0.04447 0.04121 0.04120 -0.02425 0.04120 0.04120
## 9 0.973 230.9 0.9967 -0.08163 0.02150 0.02149 -0.2653 0.02164 0.02149
## 10 0.973 229.0 0.9967 -0.03919 0.02172 0.02172 -0.1371 0.02176 0.02172
## 11 0.974 226.9 0.9967 -0.02088 0.02174 0.02174 -0.2088 0.02183 0.02174
## 12 0.973 223.2 0.9966 0.02020 0.02222 0.02222 -0.08081 0.02224 0.02222
## 13 0.973 230.9 0.9967 -0.02068 0.02149 0.02149 0.2026 0.02158 0.02149
## 14 0.973 229.0 0.9967 -0.1956 0.02180 0.02172 0.07390 0.02173 0.02172
## 15 0.974 226.9 0.9967 -0.1044 0.02176 0.02174 0.1775 0.02181 0.02174
## 16 0.973 223.2 0.9966 -0.1556 0.02228 0.02222 0.1659 0.02228 0.02222
## hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 -0.008647 0.004716 212.0 212.0 1 eta 1.525
## 2 -0.01976 0.004752 210.4 210.4 1 eta 1.531
## 3 -0.01730 0.004296 232.8 232.8 1 eta 1.176
## 4 -0.03876 0.004369 228.9 228.9 1 eta 1.18
## 5 -0.07729 0.009947 100.5 100.5 1 eta 2.41
## 6 -0.003293 0.01001 99.88 99.88 1 eta 2.426
## 7 -0.07678 0.01015 98.52 98.52 1 eta 2.378
## 8 -0.01212 0.01029 97.22 97.22 1 eta 2.41
## 9 -0.1190 0.004331 230.9 230.9 1 eta 1.3
## 10 -0.06148 0.004366 229.0 229.0 1 eta 1.303
## 11 -0.09394 0.004407 226.9 226.9 1 eta 1.293
## 12 -0.03628 0.004480 223.2 223.2 1 eta 1.3
## 13 0.09092 0.004331 230.9 230.9 1 eta 1.3
## 14 0.03313 0.004366 229.0 229.0 1 eta 1.303
## 15 0.07987 0.004407 226.9 226.9 1 eta 1.293
## 16 0.07448 0.004480 223.2 223.2 1 eta 1.3
## gt_DD_pop vgt_DD_pop Wgt_DD_pop
## <dbl> <dbl> <dbl>
## 1 -0.02249 0.02436 0.02436
## 2 -0.05242 0.02466 0.02466
## 3 -0.03872 0.01911 0.01910
## 4 -0.08518 0.01951 0.01949
## 5 NA NA NA
## 6 NA NA NA
## 7 NA NA NA
## 8 NA NA NA
## 9 NA NA NA
## 10 NA NA NA
## 11 NA NA NA
## 12 NA NA NA
## 13 NA NA NA
## 14 NA NA NA
## 15 NA NA NA
## 16 NA NA NA
## vary_id
## <chr>
## 1 Global assessment of functioning (GAF)/12/Activity groups
## 2 Global assessment of functioning (GAF)/12/Art therapy
## 3 Global assessment of functioning (GAF)/24/Activity groups
## 4 Global assessment of functioning (GAF)/24/Art therapy
## 5 Positive and negative syndrome scale/12/Activity groups
## 6 Positive and negative syndrome scale/12/Art therapy
## 7 Positive and negative syndrome scale/24/Activity groups
## 8 Positive and negative syndrome scale/24/Art therapy
## 9 Social functioning/12/Activity groups
## 10 Social functioning/12/Art therapy
## 11 Social functioning/24/Activity groups
## 12 Social functioning/24/Art therapy
## 13 Wellbeing/12/Activity groups
## 14 Wellbeing/12/Art therapy
## 15 Wellbeing/24/Activity groups
## 16 Wellbeing/24/Art therapy
rm(Crawford2012_act_wide, Crawford2012_art_wide)
Entering data from Table 2 (p. 268)
Druss2010 <- tibble(
outcome = rep(c(
# "patient_activation", # unused outcomes
# "Physical_activity",
# "medication_adherence",
"QoL_physical",
"QoL_mental"
), each = 2),
group = rep(c(
"HARP",
"TAU"
), 2),
N = rep(c(
41,39
), 2),
N_start = rep(c(
41,39
), 2),
m_pre = c(
#48.3, 47.6, # patient activation
#150, 154, # Physical_activity
#1.5, 1.5, # medication_adherence
36.9, 37.0, # QoL_physical
33.3, 33.9 # QoL_mental
),
sd_pre = c(
#11.5, 12.3,
#236, 194,
#1.2, 1.4,
10.3, 12.5,
9.13, 9.3
),
m_post = c(
#52.0, 44.9,
#191, 152,
#1.3, 1.6,
42.9, 40,
36.8, 37.0
),
sd_post = c(
#10.1, 9.6,
#278, 249,
#1.3, 1.4,
14.2, 13.7,
10.0, 11.8
)
)
Druss2010_est <-
Druss2010 |>
mutate(group = case_match(group, "HARP" ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
analysis_plan = "Wellbeing and Quality of Life",
N_total = N_t + N_c,
p_val_f = c(
#0.03, 0.4, 0.22,
0.41, 0.96
),
F_val = qf(p_val_f, df1 = 1, df2 = N_total - 2, lower.tail = FALSE),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Druss et al. 2010",
main_es_method = "Raw diff-in-diffs",
df_ind = N_total,
m_post = if_else(outcome != "medication_adherence", m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
m_diff_t = if_else(outcome != "medication_adherence", m_post_t - m_pre_t, (m_post_t - m_pre_t) * -1),
m_diff_c = if_else(outcome != "medication_adherence", m_post_c - m_pre_c, (m_post_c - m_pre_c) * -1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = d_DD^2/F_val + d_DD^2/(2*df_ind),
Wd_DD = d_DD^2/F_val,
g_DD = J * d_DD,
vg_DD = g_DD^2/F_val + g_DD^2/(2*df_ind),
Wg_DD = g_DD^2/F_val,
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# We don't know the average group size. Therefore, we impute this value
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
ppcor_method = "F value used",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Druss2010_est
## # A tibble: 2 × 62
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 QoL_physical 41 39 41 39 36.9 37 10.3 12.5
## 2 QoL_mental 41 39 41 39 33.3 33.9 9.13 9.3
## m_post_t m_post_c sd_post_t sd_post_c analysis_plan N_total
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 42.9 40 14.2 13.7 Wellbeing and Quality of Life 80
## 2 36.8 37 10 11.8 Wellbeing and Quality of Life 80
## p_val_f F_val effect_size sd_used study
## <dbl> <dbl> <chr> <chr> <chr>
## 1 0.41 0.6862 SMD Pooled posttest SD Druss et al. 2010
## 2 0.96 0.002532 SMD Pooled posttest SD Druss et al. 2010
## main_es_method df_ind m_post sd_pool d_post vd_post Wd_post J
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Raw diff-in-diffs 80 2.9 13.96 0.2078 0.05030 0.05003 0.9906
## 2 Raw diff-in-diffs 80 -0.2000 10.91 -0.01832 0.05003 0.05003 0.9906
## g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.2058 0.05030 0.05003 6 3 0.2149 0.06761 0.06732 0.2129
## 2 -0.01815 0.05003 0.05003 3.5 3.1 0.03665 0.5306 0.5306 0.03631
## vg_DD Wg_DD avg_cl_size avg_cl_type icc icc_type ppcor_method
## <dbl> <dbl> <dbl> <chr> <dbl> <chr> <chr>
## 1 0.06634 0.06606 8 Imputed 0.1 Imputed F value used
## 2 0.5207 0.5206 8 Imputed 0.1 Imputed F value used
## n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post gt_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 0.971 75.28 0.9900 0.1997 0.06481 0.06454 0.2066
## 2 1 0.971 75.28 0.9900 -0.01762 0.06454 0.06454 0.03523
## vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.08053 0.08025 0.08401 0.01328 75.28 75.28 1 eta
## 2 0.6325 0.6325 0.005106 0.01328 75.28 75.28 1 eta
## adj_value_DD vary_id
## <dbl> <chr>
## 1 1.29 QoL_physical
## 2 1.29 QoL_mental
Data from Table 2 (p. 532), containing means and SD for health related quality of life (PCS and MCS),and Table 3 (p. 533), containing means and SD for RAS
# Data from table 2 (p. 532), containing means and SD for health related quality of life
# (PCS and MCS),and table 3 (p. 533), containing means and SD for RAS
Druss2018 <- tibble(
group = as.factor(rep(c("Intervention",
"Control"),
each = 1,6)),
timing = rep(c("3m", "6m"), each = 6,1),
outcome = as.factor(rep(c("RAS", # Recovery Assessment Scale
# Both of the below measures is related to health related quality of life
# as measured by the Short-Form Health Survey (SF-36) (see p. 531)
"PCS", # The physical component summary
"MCS"), # The mental component summary
each= 2,2)),
N = rep(c(198, 202), each = 1,6),
N_start = rep(c(198, 202), each = 1,6),
m_pre = rep(c(
3.72, 3.66, # RAS
32.73, 32.74, # PCS
32.05, 32.04) # MCS
, each = 1,2)
,
sd_pre = rep(c(
0.62, 0.57, # RAS
10.92, 11.29, # PCS
11.79, 11.36), # MCS
each = 1,2)
,
m_post = c(
3.89, 3.70, # RAS 3 months
34.49, 33.89, # PCS 3 months
34.49, 34.25, # MCS 3 months
3.87, 3.74, # RAS 6 months
35.42, 34.25, # PCS 6 months
36.64, 34.54 # MCS 6 months
),
sd_post = c(
0.55, 0.68, # RAS 3 months
11.15, 10.41, # PCS 3 months
11.15, 11.97, # MCS 3 months
0.61, 0.59, # RAS 6 months
11.02, 11.52, # PCS 6 months
12.28, 11.82 # MCS 6 months
)
) |>
#arrange(outcome) |>
relocate(outcome, .after = group); Druss2018
## # A tibble: 12 × 9
## group outcome timing N N_start m_pre sd_pre m_post sd_post
## <fct> <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention RAS 3m 198 198 3.72 0.62 3.89 0.55
## 2 Control RAS 3m 202 202 3.66 0.57 3.7 0.68
## 3 Intervention PCS 3m 198 198 32.73 10.92 34.49 11.15
## 4 Control PCS 3m 202 202 32.74 11.29 33.89 10.41
## 5 Intervention MCS 3m 198 198 32.05 11.79 34.49 11.15
## 6 Control MCS 3m 202 202 32.04 11.36 34.25 11.97
## 7 Intervention RAS 6m 198 198 3.72 0.62 3.87 0.61
## 8 Control RAS 6m 202 202 3.66 0.57 3.74 0.59
## 9 Intervention PCS 6m 198 198 32.73 10.92 35.42 11.02
## 10 Control PCS 6m 202 202 32.74 11.29 34.25 11.52
## 11 Intervention MCS 6m 198 198 32.05 11.79 36.64 12.28
## 12 Control MCS 6m 202 202 32.04 11.36 34.54 11.82
# Making the druss2018 tibble wide in order to estimate the effect sizes and
# further analysis.
# Turning data into wide format
Druss2018_wide <-
Druss2018 |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Druss2018_est <-
Druss2018_wide |>
# Based on the degrees of freedom value reported in Druss et al. 2018 table 2 and 3
mutate(
analysis_plan = case_when(
str_detect(outcome, "RAS") ~ "Hope, Empowerment & Self-efficacy",
str_detect(outcome, "PCS|MCS") ~ "Wellbeing and Quality of Life",
.default = NA_character_
),
study = "Druss et al. 2018",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
ppcor = ppcor_imp, # Imputed ppcor
ppcor_method = "Imputed",
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
m_post = (m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
m_diff_t = m_post_t - m_pre_t,
m_diff_c = m_post_c - m_pre_c,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) ,
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD,
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Average cluster size in treatment group
# Harp intevention had six to ten partcipants
avg_cl_size = 8,
avg_cl_type = "From study (p. 530)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)
) |>
ungroup() |>
mutate(vary_id = paste0(outcome, "/", timing)
); Druss2018_est
## # A tibble: 6 × 62
## outcome timing N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t
## <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 RAS 3m 198 202 198 202 3.72 3.66 0.62
## 2 PCS 3m 198 202 198 202 32.73 32.74 10.92
## 3 MCS 3m 198 202 198 202 32.05 32.04 11.79
## 4 RAS 6m 198 202 198 202 3.72 3.66 0.62
## 5 PCS 6m 198 202 198 202 32.73 32.74 10.92
## 6 MCS 6m 198 202 198 202 32.05 32.04 11.79
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.57 3.89 3.7 0.55 0.68
## 2 11.29 34.49 33.89 11.15 10.41
## 3 11.36 34.49 34.25 11.15 11.97
## 4 0.57 3.87 3.74 0.61 0.59
## 5 11.29 35.42 34.25 11.02 11.52
## 6 11.36 36.64 34.54 12.28 11.82
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 Hope, Empowerment & Self-efficacy Druss et al. 2018 SMD
## 2 Wellbeing and Quality of Life Druss et al. 2018 SMD
## 3 Wellbeing and Quality of Life Druss et al. 2018 SMD
## 4 Hope, Empowerment & Self-efficacy Druss et al. 2018 SMD
## 5 Wellbeing and Quality of Life Druss et al. 2018 SMD
## 6 Wellbeing and Quality of Life Druss et al. 2018 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind m_post
## <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 400 400 0.19
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 400 400 0.6000
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 400 400 0.2400
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 400 400 0.1300
## 5 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 400 400 1.170
## 6 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 400 400 2.100
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.6191 0.3069 0.01012 0.01000 0.9981 0.3063 0.01012 0.01000 0.17
## 2 10.78 0.05565 0.01000 0.01000 0.9981 0.05554 0.01000 0.01000 1.760
## 3 11.57 0.02074 0.01000 0.01000 0.9981 0.02070 0.01000 0.01000 2.440
## 4 0.6000 0.2167 0.01006 0.01000 0.9981 0.2163 0.01006 0.01000 0.1500
## 5 11.28 0.1038 0.01001 0.01000 0.9981 0.1036 0.01001 0.01000 2.690
## 6 12.05 0.1743 0.01004 0.01000 0.9981 0.1739 0.01004 0.01000 4.590
## m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.04000 0.2100 0.01006 0.01000 0.2096 0.01006 0.01000 8
## 2 1.150 0.05657 0.01001 0.01000 0.05647 0.01000 0.01000 8
## 3 2.21 0.01988 0.01000 0.01000 0.01984 0.01000 0.01000 8
## 4 0.08000 0.1167 0.01002 0.01000 0.1165 0.01002 0.01000 8
## 5 1.510 0.1047 0.01001 0.01000 0.1045 0.01001 0.01000 8
## 6 2.5 0.1734 0.01004 0.01000 0.1731 0.01004 0.01000 8
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 530) 0.1 Imputed 1 0.974 382.7 0.9980
## 2 From study (p. 530) 0.1 Imputed 1 0.974 382.7 0.9980
## 3 From study (p. 530) 0.1 Imputed 1 0.974 382.7 0.9980
## 4 From study (p. 530) 0.1 Imputed 1 0.974 382.7 0.9980
## 5 From study (p. 530) 0.1 Imputed 1 0.974 382.7 0.9980
## 6 From study (p. 530) 0.1 Imputed 1 0.974 382.7 0.9980
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.2983 0.01316 0.01304 0.2041 0.01310 0.01304 0.09131 0.002613 382.7
## 2 0.05409 0.01305 0.01304 0.05499 0.01305 0.01304 0.02462 0.002613 382.7
## 3 0.02016 0.01304 0.01304 0.01932 0.01304 0.01304 0.008649 0.002613 382.7
## 4 0.2106 0.01310 0.01304 0.1134 0.01306 0.01304 0.05076 0.002613 382.7
## 5 0.1009 0.01305 0.01304 0.1017 0.01305 0.01304 0.04553 0.002613 382.7
## 6 0.1694 0.01308 0.01304 0.1686 0.01308 0.01304 0.07544 0.002613 382.7
## df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <chr> <dbl> <chr>
## 1 382.7 1 eta 1.304 RAS/3m
## 2 382.7 1 eta 1.304 PCS/3m
## 3 382.7 1 eta 1.304 MCS/3m
## 4 382.7 1 eta 1.304 RAS/6m
## 5 382.7 1 eta 1.304 PCS/6m
## 6 382.7 1 eta 1.304 MCS/6m
Data from table 2 (p. 516) containing means and standard deviation
Dyck2000 <- tibble(
group = as.factor(c("Multiple-family group",
"Standard care")),
outcome = "MSANS", #The modified Scale for the Assessment of Negative Symptoms
N = 21,
N_start = 21,
m_pre = c(
7.9, 8.7
),
m_post = c(
# 7.4, 9.1, # 3 months
# 7.2, 8.9, # 6 months
# 7.2, 8.9, # 9 months
7.2, 8.4 # 12 months, the real post-treatment measure because the treatment
# ends after 12 months.
),
sd_pre = c(
3.1, 3.3
),
sd_post = c(
# 2.3, 3.2, # 3 months
# 2.1, 2.7, # 6 months
# 2.1, 3, # 9 months
2, 3.1 # 12 months, the real post-treatment measure because the treatment
# ends after 12 months.
)
)
# Making the dyck2000 tibble wide in order to estimate the effect sizes and
# further analysis.
Dyck2000_wide <-
Dyck2000 |>
mutate (group = case_match(
group, "Multiple-family group" ~ "t", "Standard care" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
# Effect size calculating
Dyck2000_est <-
Dyck2000_wide |>
mutate(
analysis_plan = "All mental health outcomes/Negative symptoms",
F_val = 6.1,
study = "Dyck et al. 2000",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
N_total = N_t + N_c,
df_ind = N_total,
# The outcome MSANS reverted because lower score is beneficial
m_post = (m_post_t - m_post_c)*-1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# The outcome MSANS reverted because lower score is beneficial
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = d_DD^2/F_val + d_DD^2/(2*df_ind),
Wd_DD = d_DD^2/F_val,
g_DD = J * d_DD,
vg_DD = g_DD^2/F_val + g_DD^2/(2*df_ind),
Wg_DD = g_DD^2/F_val
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Average cluster size in treatment group
avg_cl_size = 7,
avg_cl_type = "From study (p. 516)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
ppcor_method = "F value used",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD)
) |>
ungroup() |>
mutate(vary_id = outcome); Dyck2000_est
## # A tibble: 1 × 61
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c m_post_t m_post_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 MSANS 21 21 21 21 7.9 8.7 7.2 8.4
## sd_pre_t sd_pre_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl>
## 1 3.1 3.3 2 3.1
## analysis_plan F_val study
## <chr> <dbl> <chr>
## 1 All mental health outcomes/Negative symptoms 6.1 Dyck et al. 2000
## effect_size sd_used main_es_method N_total df_ind m_post sd_pool
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 SMD Pooled posttest SD Raw diff-in-diffs 42 42 1.2 2.609
## d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c d_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.4600 0.09776 0.09524 0.9820 0.4517 0.09767 0.09524 0.7 0.3000 0.1533
## vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.004134 0.003854 0.1506 0.003987 0.003717 7 From study (p. 516)
## icc icc_type ppcor_method n_covariates gamma_sqrt df_adj omega gt_post
## <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1 Imputed F value used 1 0.967 38.96 0.9806 0.4362
## vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1215 0.1190 0.1454 0.004604 0.004332 0.3503 0.02567 38.96 38.96
## n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <chr> <dbl> <chr>
## 1 1 eta 1.25 MSANS
Missing data analysis to support the RoB 2 D4 assessment
# Testing missing
Timmermans_sample_size_dat <-
tibble(
outcome = rep(c("Empoverment", "Hope", "Quality", "Self-e", "Loneliness"), each = 4),
timing = rep(c("3 months", "6 months"), each = 2, n_distinct(outcome)),
#measure = rep(c("post", "followup"), each = 2, n_distinct(outcome)),
group = rep(c("Treatment", "Control"), 10),
N_start = rep(rep(c(168, 165), 10)),
N_actual = c(
136, 117, 121, 99,
132, 118, 120, 97,
124, 114, 111, 97,
134, 116, 121, 100,
138, 122, 125, 102
)
); Timmermans_sample_size_dat
## # A tibble: 20 × 5
## outcome timing group N_start N_actual
## <chr> <chr> <chr> <dbl> <dbl>
## 1 Empoverment 3 months Treatment 168 136
## 2 Empoverment 3 months Control 165 117
## 3 Empoverment 6 months Treatment 168 121
## 4 Empoverment 6 months Control 165 99
## 5 Hope 3 months Treatment 168 132
## 6 Hope 3 months Control 165 118
## 7 Hope 6 months Treatment 168 120
## 8 Hope 6 months Control 165 97
## 9 Quality 3 months Treatment 168 124
## 10 Quality 3 months Control 165 114
## 11 Quality 6 months Treatment 168 111
## 12 Quality 6 months Control 165 97
## 13 Self-e 3 months Treatment 168 134
## 14 Self-e 3 months Control 165 116
## 15 Self-e 6 months Treatment 168 121
## 16 Self-e 6 months Control 165 100
## 17 Loneliness 3 months Treatment 168 138
## 18 Loneliness 3 months Control 165 122
## 19 Loneliness 6 months Treatment 168 125
## 20 Loneliness 6 months Control 165 102
Missingness analysis (used to conduct risk of bias assessement)
Timmermans_missingness <-
Timmermans_sample_size_dat |>
summarise(
N_start_total = sum(N_start),
N_actual_total = sum(N_actual),
#percent_missing_total = round(mean(percent_missing)),
percent_missing_total = round((1 - (N_actual_total/N_start_total)) * 100),
RoB_D3_assess = case_when(
percent_missing_total >= 25 ~ "High",
percent_missing_total < 25 ~ "Some concerns",
TRUE ~ NA_character_
),
.by = c(outcome, timing)
)
Timmermans_missingness
## # A tibble: 10 × 6
## outcome timing N_start_total N_actual_total percent_missing_total
## <chr> <chr> <dbl> <dbl> <dbl>
## 1 Empoverment 3 months 333 253 24
## 2 Empoverment 6 months 333 220 34
## 3 Hope 3 months 333 250 25
## 4 Hope 6 months 333 217 35
## 5 Quality 3 months 333 238 29
## 6 Quality 6 months 333 208 38
## 7 Self-e 3 months 333 250 25
## 8 Self-e 6 months 333 221 34
## 9 Loneliness 3 months 333 260 22
## 10 Loneliness 6 months 333 227 32
## RoB_D3_assess
## <chr>
## 1 Some concerns
## 2 High
## 3 High
## 4 High
## 5 High
## 6 High
## 7 High
## 8 High
## 9 Some concerns
## 10 High
Data is retrieved from Tables 2 & 3 (p. 58)
Timmermans2012 <-
Timmermans_sample_size_dat |>
rename(N = N_actual) |>
mutate(
#From Table 2 (p. 58)
m_pre = c(
rep(c(3.40, 3.37), 2), # Empowerment
rep(c(2.78, 2.76), 2), # Hope
rep(c(4.32, 4.23), 2), # Quality of life
rep(c(4.38, 4.33), 2), # Self-efficacy beliefs
rep(c(6.40, 6.87), 2) # Loneliness
),
sd_pre = c(
rep(c(0.49, 0.51), 2), # Empowerment
rep(c(0.47, 0.48), 2), # Hope
rep(c(0.88, 1), 2), # Quality of life
rep(c(0.82, 0.89), 2), # Self-efficacy beliefs
rep(c(3.56, 3.40), 2) # Loneliness
),
m_post = c(
3.55, 3.38, 3.59, 3.40, # Empowerment
2.91, 2.79, 2.97, 2.73, # Hope
4.49, 4.36, 4.63, 4.39, # Quality of life
4.65, 4.35, 4.71, 4.4, # Self-efficacy beliefs
5.89, 6.27, 3.87, 3.68 # Loneliness
),
sd_post = c(
0.48, 0.53, 0.50, 0.56,
0.47, 0.53, 0.46, 0.48,
0.96, 1.07, 0.97, 1.05,
0.81, 0.97, 0.93, 0.88,
3.61, 3.55, 3.87, 3.68
),
es_paper = rep(
c(
0.27, 0.36,
0.25, 0.48,
0.03, 0.15,
0.27, 0.23,
-0.04, 0.15
),
each = 2
),
# From Table 3 (p. 58)
b_adj = c(
.12, .021, .13, .046, #Empowerment
.10, .038, .17, .004, #Hope
.064, .11, .11, .15, #Quality of life
.23, .064, .21, .14, #Self-efficacy beliefs
.066, -.65, -.34, -.49 #Loneliness
),
pval_b_adj = c(
.016, .55, .012, .24, #Empowerment
.039, .28, .001, .91, #Hope
.471, .09, .24, .025, #Quality of life
.010, .31, .026, .042, #Self-efficacy beliefs
.85, .008, .35, .07 #Loneliness
),
ci_l_b_adj = c(
.022, -.05, #Empowerment Treatment T1, Empowerment Control T1
.026, -.025, #Empowerment Treatment T2, Empowerment Control T2
NA, -.030,
.026, -.025,
-.11, -.016,
-.071, 0.020,
.059, -.062,
.027, .006,
-.60, -1.14,
-1.05, -1.02
),
ci_u_b_adj = c(
.22, .092, #Empowerment Treatment T1, Empowerment Control T1
.23, .12, #Empowerment Treatment T2, Empowerment Control T2
NA, .11,
.23, .12,
.23, .24,
.29, .28,
.40, .19,
.39, .27,
.74, -.16,
.37, .042
),
tval_b_adj = qt(pval_b_adj/2, df = N-2, lower.tail = FALSE),
se_b_adj = b_adj/tval_b_adj
); Timmermans2012
## # A tibble: 20 × 16
## outcome timing group N_start N m_pre sd_pre m_post sd_post
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Empoverment 3 months Treatment 168 136 3.4 0.49 3.55 0.48
## 2 Empoverment 3 months Control 165 117 3.37 0.51 3.38 0.53
## 3 Empoverment 6 months Treatment 168 121 3.4 0.49 3.59 0.5
## 4 Empoverment 6 months Control 165 99 3.37 0.51 3.4 0.56
## 5 Hope 3 months Treatment 168 132 2.78 0.47 2.91 0.47
## 6 Hope 3 months Control 165 118 2.76 0.48 2.79 0.53
## 7 Hope 6 months Treatment 168 120 2.78 0.47 2.97 0.46
## 8 Hope 6 months Control 165 97 2.76 0.48 2.73 0.48
## 9 Quality 3 months Treatment 168 124 4.32 0.88 4.49 0.96
## 10 Quality 3 months Control 165 114 4.23 1 4.36 1.07
## 11 Quality 6 months Treatment 168 111 4.32 0.88 4.63 0.97
## 12 Quality 6 months Control 165 97 4.23 1 4.39 1.05
## 13 Self-e 3 months Treatment 168 134 4.38 0.82 4.65 0.81
## 14 Self-e 3 months Control 165 116 4.33 0.89 4.35 0.97
## 15 Self-e 6 months Treatment 168 121 4.38 0.82 4.71 0.93
## 16 Self-e 6 months Control 165 100 4.33 0.89 4.4 0.88
## 17 Loneliness 3 months Treatment 168 138 6.4 3.56 5.89 3.61
## 18 Loneliness 3 months Control 165 122 6.87 3.4 6.27 3.55
## 19 Loneliness 6 months Treatment 168 125 6.4 3.56 3.87 3.87
## 20 Loneliness 6 months Control 165 102 6.87 3.4 3.68 3.68
## es_paper b_adj pval_b_adj ci_l_b_adj ci_u_b_adj tval_b_adj se_b_adj
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.27 0.12 0.016 0.022 0.22 2.440 0.04918
## 2 0.27 0.021 0.55 -0.05 0.092 0.5995 0.03503
## 3 0.36 0.13 0.012 0.026 0.23 2.551 0.05095
## 4 0.36 0.046 0.24 -0.025 0.12 1.182 0.03891
## 5 0.25 0.1 0.039 NA NA 2.085 0.04796
## 6 0.25 0.038 0.28 -0.03 0.11 1.085 0.03501
## 7 0.48 0.17 0.001 0.026 0.23 3.375 0.05037
## 8 0.48 0.004 0.91 -0.025 0.12 0.1133 0.03529
## 9 0.03 0.064 0.471 -0.11 0.23 0.7231 0.08851
## 10 0.03 0.11 0.09 -0.016 0.24 1.710 0.06432
## 11 0.15 0.11 0.24 -0.071 0.29 1.181 0.09311
## 12 0.15 0.15 0.025 0.02 0.28 2.277 0.06586
## 13 0.27 0.23 0.01 0.059 0.4 2.614 0.08800
## 14 0.27 0.064 0.31 -0.062 0.19 1.020 0.06276
## 15 0.23 0.21 0.026 0.027 0.39 2.254 0.09315
## 16 0.23 0.14 0.042 0.006 0.27 2.061 0.06794
## 17 -0.04 0.066 0.85 -0.6 0.74 0.1895 0.3483
## 18 -0.04 -0.65 0.008 -1.14 -0.16 2.697 -0.2410
## 19 0.15 -0.34 0.35 -1.05 0.37 0.9382 -0.3624
## 20 0.15 -0.49 0.07 -1.02 0.042 1.832 -0.2675
wide_format_Timmermans2012 <- function(data, filter){
filter_func <- function(data, filter){
dat <- data |> dplyr::filter(timing != filter)
dat |>
dplyr::mutate(group = case_match(group, "Treatment" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:dplyr::last_col()
)
}
purrr::pmap_dfr(list(filter), ~ filter_func(data = data, filter = .x )) |>
arrange(outcome)
}
# Continue from here
Timmermans2012_wide <-
wide_format_Timmermans2012(data = Timmermans2012, filter = c("6 months", "3 months"))
rm(wide_format_Timmermans2012)
Effect sizes calculation
Timmermans2012_es <-
Timmermans2012 |>
summarise(
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Timmermans et al. 2012",
main_es_method = "Pretest adj. means from repeated-measure ANOVA",
ppcor = .76,
ppcor_method = "From study (p. 57)",
N_t = N[1],
N_c = N[2],
N_total = N_t + N_c,
df_ind = N_total,
n_covariates = 1,
sd_pool = sqrt( sum((N-1)*sd_post^2)/ (N_total-2) ),
m_diff_post = m_post[1] - m_post[2],
# Pretest adjusted means
mean_b_adj = b_adj[1] - b_adj[2],
# Difference in differences measures
m_diff_t = m_post[1] - m_pre[1],
m_diff_c = m_post[2] - m_pre[2],
DD = m_diff_t - m_diff_c,
es_paper = es_paper[1],
es_paper_type = "Cohens d",
# Converting Loneliness measure since "Possible scores range from 0 to 11,
# with higher scores indicating more loneliness." (p. 58)
d_post = if_else(unique(outcome) == "Loneliness", m_diff_post/sd_pool * -1, m_diff_post/sd_pool),
vd_post = sum(1/N) + d_post^2/(2*df_ind),
Wd_post = sum(1/N),
d_adj = if_else(unique(outcome) == "Loneliness", mean_b_adj/sd_pool * -1, mean_b_adj/sd_pool),
vd_adj = sum((se_b_adj/sd_pool)^2) + d_adj^2/(2*df_ind),
Wd_adj = sum((se_b_adj/sd_pool)^2),
d_DD = if_else(unique(outcome) == "Loneliness", DD/sd_pool * -1, DD/sd_pool),
vd_DD = 2*(1-ppcor) * sum(1/N) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * sum(1/N),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = sum(1/N) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
g_adj = J * d_adj,
vg_adj = sum((se_b_adj/sd_pool)^2) + g_adj^2/(2*df_ind),
Wg_adj = Wd_adj,
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * sum(1/N) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD,
.by = c(outcome, timing)
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# "was 7.0±2.1 (range of three to 12)" (p. 57)
avg_cl_size = 7,
avg_cl_type = "From study (p. 57)",
# Imputed icc value
icc = 0.06,
icc_type = "From study (p. 56)",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = vgt_post:Wgt_post
),
gt_adj = omega * d_adj * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_adj,
model = "std_reg_coef",
cluster_adj = TRUE,
SE_std = sqrt(Wg_adj),
add_name_to_vars = "_adj",
vars = -var_term1_adj
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)
) |>
ungroup()
# Timmermans2012_es
Timmermans2012_est <-
left_join(Timmermans2012_wide, Timmermans2012_es) |>
select(-c(es_paper_c, es_paper_t), -contains(c("ci_", "val_b"))) |>
mutate(vary_id = paste0(outcome, "/", timing),
analysis_plan = case_when(
outcome == "Empoverment" ~ "Hope, Empowerment & Self-efficacy",
outcome == "Hope" ~ "Hope, Empowerment & Self-efficacy",
outcome == "Quality" ~ "Wellbeing and Quality of Life",
outcome == "Self-e" ~ "All mental health outcomes",
outcome == "Loneliness" ~ "Loneliness"
)
) |>
rename(m_post = m_diff_post, mean_diff = DD)
Entering data from Table 2 (p. 872)
Gatz2007 <- tibble(
outcome = rep(c("ASI alcohol", "ASI drug", "GSI", "PSS", "Coping skills"), each = 2),
group = rep(c("Intervention", "Comparison"), dplyr::n_distinct(outcome)),
N = c(136, 177, 135, 176, 136, 177, 136, 177, 134, 173),
N_start = rep(c(187, 215), each = 5),
m_pre = c(
.18, .27,
.19, .25,
1.07, 1.09,
20.43, 19.05,
52.61, 54.26),
m_post = c(
.06, .13,
.04, .08,
.8, .86,
13.78, 15.11,
56.32, 52.96),
sd_pre = c(
.29, .35,
.15, .14,
.68, .69,
10.22, 11.84,
17.83, 17.51),
sd_post = c(
.17, .23,
.07, .11,
.72, .77,
11.1, 12.91,
20.15, 20.09)
)
Effect size calculation and cluster bias adjustment
Gatz2007_est <-
Gatz2007 |>
mutate(group = case_match(group, "Intervention" ~ "t", "Comparison" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
F_val = c(0.53, 1.23, 0.34, 3.99, 4.12), # Table 2 (p. 872)
analysis_plan = c(
"Alcohol and drug abuse/misuse", "Alcohol and drug abuse/misuse",
"All mental health outcomes", "All mental health outcomes", "Hope, Empowerment & Self-efficacy"
),
N_total = N_t + N_c,
df_ind = N_total,
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Gatz et al. 2012",
main_es_method = "Raw diff-in-diffs",
m_post = m_post_t - m_post_c,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Account for the fact that some outcomes are on different scales
m_diff_t = m_post_t - m_pre_t,
m_diff_c = m_post_c - m_pre_c,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = d_DD^2/F_val + d_DD^2/(2*df_ind),
Wd_DD = d_DD^2/F_val,
g_DD = J * d_DD,
vg_DD = g_DD^2/F_val + g_DD^2/(2*df_ind),
Wg_DD = g_DD^2/F_val
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Imputed since group sizes were not reported
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
ppcor_method = "F value used",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Gatz2007_est
## # A tibble: 5 × 61
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c m_post_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 ASI alcohol 136 177 187 187 0.18 0.27 0.06
## 2 ASI drug 135 176 187 187 0.19 0.25 0.04
## 3 GSI 136 177 187 215 1.07 1.09 0.8
## 4 PSS 136 177 215 215 20.43 19.05 13.78
## 5 Coping skills 134 173 215 215 52.61 54.26 56.32
## m_post_c sd_pre_t sd_pre_c sd_post_t sd_post_c F_val
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.13 0.29 0.35 0.17 0.23 0.53
## 2 0.08 0.15 0.14 0.07 0.11 1.23
## 3 0.86 0.68 0.69 0.72 0.77 0.34
## 4 15.11 10.22 11.84 11.1 12.91 3.99
## 5 52.96 17.83 17.51 20.15 20.09 4.12
## analysis_plan N_total df_ind effect_size
## <chr> <dbl> <dbl> <chr>
## 1 Alcohol and drug abuse/misuse 313 313 SMD
## 2 Alcohol and drug abuse/misuse 311 311 SMD
## 3 All mental health outcomes 313 313 SMD
## 4 All mental health outcomes 313 313 SMD
## 5 Hope, Empowerment & Self-efficacy 307 307 SMD
## sd_used study main_es_method m_post sd_pool
## <chr> <chr> <chr> <dbl> <dbl>
## 1 Pooled posttest SD Gatz et al. 2012 Raw diff-in-diffs -0.07 0.2061
## 2 Pooled posttest SD Gatz et al. 2012 Raw diff-in-diffs -0.04 0.09475
## 3 Pooled posttest SD Gatz et al. 2012 Raw diff-in-diffs -0.06000 0.7487
## 4 Pooled posttest SD Gatz et al. 2012 Raw diff-in-diffs -1.33 12.16
## 5 Pooled posttest SD Gatz et al. 2012 Raw diff-in-diffs 3.36 20.12
## d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.3396 0.01319 0.01300 0.9976 -0.3388 0.01319 0.01300 -0.12 -0.14
## 2 -0.4222 0.01338 0.01309 0.9976 -0.4211 0.01337 0.01309 -0.15 -0.17
## 3 -0.08014 0.01301 0.01300 0.9976 -0.07995 0.01301 0.01300 -0.27 -0.23
## 4 -0.1094 0.01302 0.01300 0.9976 -0.1091 0.01302 0.01300 -6.65 -3.94
## 5 0.1670 0.01329 0.01324 0.9976 0.1666 0.01329 0.01324 3.71 -1.300
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.09703 0.01778 0.01777 0.09680 0.01770 0.01768 8 Imputed
## 2 0.2111 0.03630 0.03622 0.2106 0.03612 0.03605 8 Imputed
## 3 -0.05343 0.008400 0.008395 -0.05330 0.008359 0.008355 8 Imputed
## 4 -0.2229 0.01253 0.01245 -0.2224 0.01247 0.01239 8 Imputed
## 5 0.2491 0.01516 0.01506 0.2484 0.01508 0.01498 8 Imputed
## icc icc_type ppcor_method n_covariates gamma_sqrt df_adj omega gt_post
## <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1 Imputed F value used 1 0.97 300.4 0.9975 -0.3286
## 2 0.1 Imputed F value used 1 0.97 298.5 0.9975 -0.4085
## 3 0.1 Imputed F value used 1 0.97 300.4 0.9975 -0.07754
## 4 0.1 Imputed F value used 1 0.97 300.4 0.9975 -0.1059
## 5 0.1 Imputed F value used 1 0.97 294.6 0.9975 0.1616
## vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.01776 0.01758 0.09389 0.02250 0.02249 0.03612 0.003329 300.4 300.4
## 2 0.01799 0.01771 0.2042 0.04595 0.04588 0.05517 0.003350 298.5 298.5
## 3 0.01759 0.01758 -0.05169 0.01063 0.01063 -0.02893 0.003329 300.4 300.4
## 4 0.01760 0.01758 -0.2157 0.01584 0.01576 -0.09903 0.003329 300.4 300.4
## 5 0.01794 0.01789 0.2410 0.01914 0.01904 0.1017 0.003395 294.6 294.6
## n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <chr> <dbl> <chr>
## 1 1 eta 1.352 ASI alcohol
## 2 1 eta 1.353 ASI drug
## 3 1 eta 1.352 GSI
## 4 1 eta 1.352 PSS
## 5 1 eta 1.351 Coping skills
Gonzalez2007_est <-
tibble(
study = "Gonzalez & Prihoda 2007",
analysis_plan = c(
"Social functioning (degree of impairment)",
"All mental health outcomes"
),
effect_size = "SMD",
sd_used = "Pooled posttest SD (assumed)",
main_es_method = "Repeated-measure ANOVA with emm",
ppcor_method = "F value used",
outcome = c("GAF", "CGI"),
N_start_t = 11,
N_start_c = 11,
# Actual samples sizes
N_t = 8, # Three patients terminated the group early (p. 411)
N_c = 9, # Two of the control subjects were also lost two follow-up (p. 412)
N_total = N_t + N_c,
es_paper = c(0.20, 0.66),
es_paper_type = "Cohen d (assumed)",
b_emm_post_t = c(72.20, 1.75),
b_emm_post_c = c(69.30, 2.61),
se_emm_post_t = c(4.11, 0.37),
se_emm_post_c = c(4.11, 0.37),
mean_b_emm = if_else(outcome == "GAF", (b_emm_post_t - b_emm_post_c), (b_emm_post_t - b_emm_post_c) * -1),
sd_total = abs(mean_b_emm)/es_paper,
# Using E.14 from WWC Handbook (ver. 5). We imputed the covariate-adjusted mean difference to obtain this esti
sd_pool = sqrt( ((N_total-1)/(N_total-2)) * sd_total^2 - ((N_t*N_c)/(N_total*(N_total-2))) * mean_b_emm^2),
pval_paper = c(
0.65,
0.15 # Is reported as <0.05 and must be estimated from the corresponding F_val
),
F_val = c(0.22, 2.34),
#pval_test = pf(F_val, df1 = 1, df2 = 11, lower.tail = FALSE)
df_ind = N_total,
d_adj = es_paper,
vd_adj = d_adj^2/F_val + d_adj^2/(2*N_total),
Wd_adj = d_adj^2/F_val,
J = 1 - 3/(4*df_ind-1),
g_adj = J * d_adj,
vg_adj = g_adj^2/F_val + g_adj^2/(2*N_total),
Wg_adj = g_adj^2/F_val
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# he group, with 7 to 11 active members
avg_cl_size = 7,
avg_cl_type = "From study (p. 408)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_adj = omega * d_adj * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_adj,
model = "emmeans",
cluster_adj = FALSE,
F_val = F_val,
add_name_to_vars = "_adj",
vars = -var_term1_adj
),
vary_id = outcome
); Gonzalez2007_est
## # A tibble: 2 × 49
## # Rowwise:
## study analysis_plan effect_size
## <chr> <chr> <chr>
## 1 Gonzalez & Prihoda 2007 Social functioning (degree of impairment) SMD
## 2 Gonzalez & Prihoda 2007 All mental health outcomes SMD
## sd_used main_es_method ppcor_method
## <chr> <chr> <chr>
## 1 Pooled posttest SD (assumed) Repeated-measure ANOVA with emm F value used
## 2 Pooled posttest SD (assumed) Repeated-measure ANOVA with emm F value used
## outcome N_start_t N_start_c N_t N_c N_total es_paper es_paper_type
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 GAF 11 11 8 9 17 0.2 Cohen d (assumed)
## 2 CGI 11 11 8 9 17 0.66 Cohen d (assumed)
## b_emm_post_t b_emm_post_c se_emm_post_t se_emm_post_c mean_b_emm sd_total
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 72.2 69.3 4.11 4.11 2.900 14.50
## 2 1.75 2.61 0.37 0.37 0.86 1.303
## sd_pool pval_paper F_val df_ind d_adj vd_adj Wd_adj J g_adj vg_adj
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 14.90 0.65 0.22 17 0.2 0.1830 0.1818 0.9552 0.1910 0.1670
## 2 1.266 0.15 2.34 17 0.66 0.1990 0.1862 0.9552 0.6304 0.1815
## Wg_adj avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt
## <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.1659 7 From study (p. 408) 0.1 Imputed 1 0.952
## 2 0.1699 7 From study (p. 408) 0.1 Imputed 1 0.952
## df_adj omega gt_adj vgt_adj Wgt_adj hg_adj vhg_adj h_adj n_covariates_adj
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 14.92 0.9489 0.1807 0.1897 0.1886 0.1076 0.06702 14.92 1
## 2 14.92 0.9489 0.5962 0.2050 0.1931 0.3478 0.06702 14.92 1
## adj_fct_adj adj_value_adj vary_id
## <chr> <dbl> <chr>
## 1 eta 1.271 GAF
## 2 eta 1.271 CGI
Entering data from Table 2 (p. 124)
Gordon2018 <- tibble(
outcome = as.factor(rep(c(
"QLS_total",
#"QLS_interpersonal",
#"QLS_ instrumental",
#"BLERT",
"LSP",
#"SCSQ-ToM",
"SSPA",
"DASS-21"
#"AIHQ-Hostility-bias"
),
each = 2)),
group = rep(c("SCIT", "Control"), n_distinct(outcome)),
N = rep(c(21, 15), n_distinct(outcome)),
N_start = rep(c(21, 15), 4),
m_pre = c(
50.24, 45.73, # QLS total
#15.86, 13.40, # QLS interpersonal subscale
#6.19, 6.00, # QLS instrumental subscale
#14.43, 14.40, # BLERT
13.38, 14.53, # LSP
#7.33, 7.07, # SCSQ-ToM
65.19, 59.07, # SSPA
43.33, 53.33 # DASS-21
# 8.43, 8.53 # AIHQ-Hostility-bias
),
sd_pre = c(
15.83, 13.85,
#7.26, 7.18,
#5.94, 6.21,
#3.62, 3.15,
7.44, 6.12,
#1.62, 1.79,
12.03, 10.57,
26.20, 32.73
#3.80, 4.24
),
m_post = c(
56.30, 47.67,
#17.40, 14.47,
#6.95, 6.53,
#15.90, 15.93,
10.29, 13.60,
#7.50, 7.07,
71.25, 63.57,
41.10, 49.13
#6.80, 8.87
),
sd_post = c(
16.34, 13.19,
#8.33, 6.57,
#5.48, 6.63,
#3.62, 2.76,
4.59, 6.10,
#1.53,1.40,
8.22, 7.89,
25.96, 31.40
#1.73, 2.29
)
); Gordon2018
## # A tibble: 8 × 8
## outcome group N N_start m_pre sd_pre m_post sd_post
## <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 QLS_total SCIT 21 21 50.24 15.83 56.3 16.34
## 2 QLS_total Control 15 15 45.73 13.85 47.67 13.19
## 3 LSP SCIT 21 21 13.38 7.44 10.29 4.59
## 4 LSP Control 15 15 14.53 6.12 13.6 6.1
## 5 SSPA SCIT 21 21 65.19 12.03 71.25 8.22
## 6 SSPA Control 15 15 59.07 10.57 63.57 7.89
## 7 DASS-21 SCIT 21 21 43.33 26.2 41.1 25.96
## 8 DASS-21 Control 15 15 53.33 32.73 49.13 31.4
Effect size calculation and cluster bias adjustment
Gordon2018_est <-
Gordon2018 |>
mutate(group = case_match(group, "SCIT" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
F_val = c(
2.503, #0.019,
0.905, #0.632,
0.039, 0.573 # 2.99
),
analysis_plan = case_when(
outcome == "DASS-21" ~ "All mental health outcomes",
str_detect(outcome, "SSPA|LSP") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "QLS") ~ "Wellbeing and Quality of Life",
TRUE ~ NA_character_
),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Gordon et al. 2018",
main_es_method = "Raw diff-in-diffs",
ppcor = ppcor_imp,
ppcor_method = "Imputed - F-vals seemed flawed",
N_total = N_t + N_c,
df_ind = N_total,
# Calculate d post
m_post = m_post_t - m_post_c,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Account for the fact that some outcomes are on different scales
m_diff_t = m_post_t - m_pre_t,
m_diff_c = m_post_c - m_pre_c,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c)
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Imputed since group sizes were not reported
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Gordon2018_est
## # A tibble: 4 × 62
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 QLS_total 21 15 21 15 50.24 45.73 15.83 13.85
## 2 LSP 21 15 21 15 13.38 14.53 7.44 6.12
## 3 SSPA 21 15 21 15 65.19 59.07 12.03 10.57
## 4 DASS-21 21 15 21 15 43.33 53.33 26.2 32.73
## m_post_t m_post_c sd_post_t sd_post_c F_val
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 56.3 47.67 16.34 13.19 2.503
## 2 10.29 13.6 4.59 6.1 0.905
## 3 71.25 63.57 8.22 7.89 0.039
## 4 41.1 49.13 25.96 31.4 0.573
## analysis_plan effect_size sd_used
## <chr> <chr> <chr>
## 1 Wellbeing and Quality of Life SMD Pooled posttest SD
## 2 Social functioning (degree of impairment) SMD Pooled posttest SD
## 3 Social functioning (degree of impairment) SMD Pooled posttest SD
## 4 All mental health outcomes SMD Pooled posttest SD
## study main_es_method ppcor ppcor_method
## <chr> <chr> <dbl> <chr>
## 1 Gordon et al. 2018 Raw diff-in-diffs 0.5 Imputed - F-vals seemed flawed
## 2 Gordon et al. 2018 Raw diff-in-diffs 0.5 Imputed - F-vals seemed flawed
## 3 Gordon et al. 2018 Raw diff-in-diffs 0.5 Imputed - F-vals seemed flawed
## 4 Gordon et al. 2018 Raw diff-in-diffs 0.5 Imputed - F-vals seemed flawed
## N_total df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 36 36 8.63 15.12 0.5707 0.1188 0.1143 0.9790 0.5587 0.1186
## 2 36 36 -3.31 5.264 -0.6287 0.1198 0.1143 0.9790 -0.6156 0.1195
## 3 36 36 7.68 8.086 0.9498 0.1268 0.1143 0.9790 0.9299 0.1263
## 4 36 36 -8.03 28.33 -0.2835 0.1154 0.1143 0.9790 -0.2775 0.1154
## Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1143 6.060 1.940 0.2724 0.1153 0.1143 0.2667 0.1153 0.1143
## 2 0.1143 -3.090 -0.93 -0.4103 0.1166 0.1143 -0.4017 0.1165 0.1143
## 3 0.1143 6.06 4.5 0.1929 0.1148 0.1143 0.1889 0.1148 0.1143
## 4 0.1143 -2.230 -4.200 0.06955 0.1144 0.1143 0.06809 0.1144 0.1143
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 8 Imputed 0.1 Imputed 1 0.969 32.91 0.9770
## 2 8 Imputed 0.1 Imputed 1 0.969 32.91 0.9770
## 3 8 Imputed 0.1 Imputed 1 0.969 32.91 0.9770
## 4 8 Imputed 0.1 Imputed 1 0.969 32.91 0.9770
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5403 0.1453 0.1409 0.2579 0.1419 0.1409 0.1196 0.03039 32.91 32.91
## 2 -0.5953 0.1463 0.1409 -0.3884 0.1432 0.1409 -0.1799 0.03039 32.91 32.91
## 3 0.8992 0.1532 0.1409 0.1827 0.1414 0.1409 0.08477 0.03039 32.91 32.91
## 4 -0.2684 0.1420 0.1409 0.06584 0.1410 0.1409 0.03057 0.03039 32.91 32.91
## n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <chr> <dbl> <fct>
## 1 1 eta 1.233 QLS_total
## 2 1 eta 1.233 LSP
## 3 1 eta 1.233 SSPA
## 4 1 eta 1.233 DASS-21
Entering raw data from Table 2 (p. 67)
Gutman2019_raw <-
tibble(
outcome = rep(c("PSS", "WHOQOL-BREF"), each = 20),
group = rep(c("t", "c"), each = 10, 2),
N = 10,
pre_test = c(
25, 37, 34, 33, 19, 25, 36, 34, 32, 35, # PSS intervention
25, 30, 31, 34, 26, 21, 32, 34, 27, 35, # PSS Control
121, 114, 84, 89, 82, 83, 86, 70, 119, 93, # WHOQOL intervention
97, 113, 98, 93, 86, 93, 98, 57, 91, 101 # WHOQOL control
),
post_test = c(
21, 32, 30, 29, 15, 23, 32, 27, 28, 30,
27, 30, 33, 41, 30, 27, 32, 36, 33, 36,
125, 118, 95, 89, 87, 91, 93, 77, 125, 107,
100, 112, 95, 90, 88, 85, 100, 43, 74, 102
)
) |>
mutate(
across(pre_test:post_test, ~ (.x - mean(.x))/sd(.x), .names = "{.col}_std"),
.by = outcome
)
Effect size calculation
# Calculate raw means first and combine with _est object
Gutman2019 <-
Gutman2019_raw |>
summarise(
N = length(post_test),
m_pre = mean(pre_test),
sd_pre = sd(pre_test),
m_post = mean(post_test),
sd_post = sd(post_test),
r = cor(pre_test, post_test),
.by = c(outcome, group)
) |>
pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
N_total = N_t + N_c,
N_start_t = 21, # p. 120
N_start_c = 15,
df_ind = N_total
)
Gutman2019_cor <-
Gutman2019_raw |>
summarise(
ppcor = cor(pre_test, post_test, method = "pearson"),
ppcor_method = "From study - raw data",
.by = outcome
)
Gutman2019 <- left_join(Gutman2019, Gutman2019_cor, by = join_by(outcome))
Gutman2019_est <-
Gutman2019_raw |>
summarise(
d_reg = summary(lm(post_test_std ~ group + pre_test_std, data = pick(everything())))$coefficients[2],
var_term1_reg = summary(lm(post_test_std ~ group + pre_test_std, data = pick(everything())))$coefficients[5]^2,
.by = outcome
) |>
mutate(
d_reg = if_else(outcome == "PSS", d_reg * -1, d_reg)
) |>
left_join(Gutman2019, by = join_by(outcome)) |>
mutate(
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Gutman et al. 2019",
main_es_method = "Standardized regression from reported raw data",
ppcor = Gutman2019_cor$ppcor,
ppcor_method = Gutman2019_cor$ppcor_method,
N_total = N_t + N_c,
df_ind = N_total,
# Calculate d post
m_post = if_else(outcome == "WHOQOL-BREF", m_post_t - m_post_c, (m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post
) |>
relocate(c(d_reg:var_term1_reg), .after = last_col()) |>
mutate(
vd_reg = var_term1_reg + d_reg^2/(2*df_ind),
Wd_reg = var_term1_reg,
g_reg = J * d_reg,
vg_reg = var_term1_reg + g_reg^2/(2*df_ind),
Wg_reg = var_term1_reg,
) |>
rowwise() |>
mutate(
avg_cl_size = 10, # Assuming one cluster of 10 only
avg_cl_type = "From study",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_reg = omega * d_reg * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_reg,
model = "std_reg_coef",
cluster_adj = FALSE,
SE_std = var_term1_reg,
add_name_to_vars = "_reg"
),
#adj_fct = eta_1armcluster(N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc),
#
## Accounting for the fact that this study is single sited/clustered
#gt_post = gamma_sqrt * g_post * sqrt(1-icc),
#vgt_post = adj_fct * vg_post * (1-icc),
#Wgt_post = adj_fct * Wg_post * (1-icc),
#
#gt_reg = gamma_sqrt * g_reg * sqrt(1-icc),
#vgt_reg = adj_fct * vg_reg * (1-icc),
#Wgt_reg = adj_fct * Wg_reg * (1-icc),
#
#a = sqrt(2*Wgt_reg*df_ind),
#hg_reg = sqrt(2) * sign(gt_reg) * (log(abs(gt_reg) + sqrt(gt_reg^2 + a^2)) - log(a)),
#vhg_reg = 1/df_ind,
vary_id = outcome,
analysis_plan = case_when(
str_detect(outcome, "PSS") ~ "All mental health outcomes",
str_detect(outcome, "WHO") ~ "Wellbeing and Quality of Life"),
) |>
select(-var_term1_reg); Gutman2019_est
## # A tibble: 2 × 61
## # Rowwise:
## outcome N_t N_c m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c
## <chr> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 PSS 10 10 31 29.5 5.925 4.601 26.7 32.5
## 2 WHOQOL-BREF 10 10 94.1 92.7 17.59 14.45 100.7 88.9
## sd_post_t sd_post_c r_t r_c N_total N_start_t N_start_c df_ind ppcor
## <dbl> <dbl> <dbl> <dbl> <int> <dbl> <dbl> <int> <dbl>
## 1 5.458 4.353 0.9792 0.8351 20 21 15 20 0.6994
## 2 16.97 19.25 0.9753 0.9533 20 21 15 20 0.9147
## ppcor_method effect_size sd_used study
## <chr> <chr> <chr> <chr>
## 1 From study - raw data SMD Pooled posttest SD Gutman et al. 2019
## 2 From study - raw data SMD Pooled posttest SD Gutman et al. 2019
## main_es_method m_post sd_pool d_post vd_post
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Standardized regression from reported raw data 5.8 4.936 1.175 0.2345
## 2 Standardized regression from reported raw data 11.8 18.15 0.6503 0.2106
## Wd_post J g_post vg_post Wg_post d_reg vd_reg Wd_reg g_reg vg_reg
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.2 0.9620 1.130 0.2319 0.2 1.255 0.06350 0.02416 1.207 0.06057
## 2 0.2 0.9620 0.6256 0.2098 0.2 0.5515 0.02630 0.01869 0.5306 0.02573
## Wg_reg avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj
## <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 0.02416 10 From study 0.1 Imputed 1 0.949 17.81
## 2 0.01869 10 From study 0.1 Imputed 1 0.949 17.81
## omega gt_post vgt_post Wgt_post gt_reg vgt_reg Wgt_reg hg_reg vhg_reg
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9573 1.067 0.3117 0.28 1.140 0.03690 0.0008169 3.667 0.05556
## 2 0.9573 0.5908 0.2897 0.28 0.5010 0.007462 0.0004893 2.883 0.05556
## h_reg df_reg n_covariates_reg adj_fct_reg adj_value_reg vary_id
## <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 18 18 1 eta 1.4 PSS
## 2 18 18 1 eta 1.4 WHOQOL-BREF
## analysis_plan
## <chr>
## 1 All mental health outcomes
## 2 Wellbeing and Quality of Life
# Data from table 2, p. 39
Hagen2005 <- tibble(
outcome = rep(c(
"SCL-90",
"BAI",
"BDI",
"IIP-64-C"
#"SAS-A",
#"SAS-S",
#"YSQ"
),
each = 2,1
),
group = rep(c(
"waiting-list", "CBGT"
),
each = 1,4
),
N = c(
17, 15,
17, 15,
15, 15,
17, 14
# 16, 14,
# 16, 15,
# 16, 14
),
N_start = rep(c(17,15), each = 1,4),
m_pre = c(
1.19, 1.15,
20.29, 22.60,
18.20, 15.40,
1.35, 1.22
# 73.06, 62.93,
# 73.87, 70.80,
# 11.50, 7.21
),
sd_pre = c(
0.61, 0.61,
10.08, 14.77,
8.55, 9.86,
0.72, 0.63
# 20.23, 15.66,
# 20.26, 19.16,
# 14.15, 8.62
) ,
m_post = c(
1.15, 0.88,
22.94, 18.13,
18.35, 11.00,
1.28, 1.18
# 60.12, 58.57,
# 69.12, 60.14,
# 10.17, 6.63
),
sd_post = c(
0.47, 0.59,
13.46, 12.00,
9.00, 8.36,
0.68, 0.76
# 14.17, 18.67,
# 13.99, 22.52,
# 13.41, 11.16
),
); Hagen2005
## # A tibble: 8 × 8
## outcome group N N_start m_pre sd_pre m_post sd_post
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SCL-90 waiting-list 17 17 1.19 0.61 1.15 0.47
## 2 SCL-90 CBGT 15 15 1.15 0.61 0.88 0.59
## 3 BAI waiting-list 17 17 20.29 10.08 22.94 13.46
## 4 BAI CBGT 15 15 22.6 14.77 18.13 12
## 5 BDI waiting-list 15 17 18.2 8.55 18.35 9
## 6 BDI CBGT 15 15 15.4 9.86 11 8.36
## 7 IIP-64-C waiting-list 17 17 1.35 0.72 1.28 0.68
## 8 IIP-64-C CBGT 14 15 1.22 0.63 1.18 0.76
# Making the Hagen2006 tibble wide in order to estimate the effect sizes and
# further analysis.
Hagen2005_wide <-
Hagen2005 |>
mutate (group = case_match(
group, "CBGT" ~ "t",
"waiting-list" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
# Effect size calculating
Hagen2005_est <-
Hagen2005_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "SCL-90") ~ "All mental health outcomes",
str_detect(outcome, "BAI") ~ "All mental health outcomes/Anxiety",
str_detect(outcome, "BDI") ~ "All mental health outcomes/Depression",
str_detect(outcome, "IIP-64-C") ~ "Social functioning (degree of impairment)",
.default = NA_character_
),
# ANCOVA results from table 3 (p. 39)
# F_val = c(
# 8.46,
# 2.23,
# 5.51,
# 0.18
# ),
# df1 = c(1),
# df2= c(
# 28,
# 28,
# 27,
# 27
# )
) |>
mutate(
# Imputed ppcor
ppcor = ppcor_imp,
ppcor_method = "Imputed",
study = "Hagen et al. 2005",
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
N_total = N_t + N_c,
df_ind = N_total,
# For all measures lower scores are beneficial why these are reverted
m_post = (m_post_t - m_post_c)*-1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# All outcomes are reverted because lower score is beneficial
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Average cluster size in treatment group
# Harp intevention had six to ten partcipants
avg_cl_size = 8,
avg_cl_type = "From study (p. 35)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD)
)|>
ungroup() |>
mutate(vary_id = outcome); Hagen2005_est
## # A tibble: 4 × 61
## outcome N_c N_t N_start_c N_start_t m_pre_c m_pre_t sd_pre_c sd_pre_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SCL-90 17 15 17 15 1.19 1.15 0.61 0.61
## 2 BAI 17 15 17 15 20.29 22.6 10.08 14.77
## 3 BDI 15 15 17 15 18.2 15.4 8.55 9.86
## 4 IIP-64-C 17 14 17 15 1.35 1.22 0.72 0.63
## m_post_c m_post_t sd_post_c sd_post_t
## <dbl> <dbl> <dbl> <dbl>
## 1 1.15 0.88 0.47 0.59
## 2 22.94 18.13 13.46 12
## 3 18.35 11 9 8.36
## 4 1.28 1.18 0.68 0.76
## analysis_plan ppcor ppcor_method study
## <chr> <dbl> <chr> <chr>
## 1 All mental health outcomes 0.5 Imputed Hagen et al. 2005
## 2 All mental health outcomes/Anxiety 0.5 Imputed Hagen et al. 2005
## 3 All mental health outcomes/Depression 0.5 Imputed Hagen et al. 2005
## 4 Social functioning (degree of impairment) 0.5 Imputed Hagen et al. 2005
## effect_size sd_used main_es_method N_total df_ind m_post
## <chr> <chr> <chr> <dbl> <dbl> <dbl>
## 1 SMD Pooled posttest SDs Raw diff-in-diffs 32 32 0.27
## 2 SMD Pooled posttest SDs Raw diff-in-diffs 32 32 4.81
## 3 SMD Pooled posttest SDs Raw diff-in-diffs 30 30 7.35
## 4 SMD Pooled posttest SDs Raw diff-in-diffs 31 31 0.1000
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5294 0.5100 0.1296 0.1255 0.9764 0.4980 0.1294 0.1255 0.27 0.04000
## 2 12.80 0.3758 0.1277 0.1255 0.9764 0.3669 0.1276 0.1255 4.47 -2.650
## 3 8.686 0.8462 0.1453 0.1333 0.9748 0.8249 0.1447 0.1333 4.4 -0.1500
## 4 0.7170 0.1395 0.1306 0.1303 0.9756 0.1361 0.1306 0.1303 0.04000 0.07000
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.4345 0.1284 0.1255 0.4242 0.1283 0.1255 8 From study (p. 35)
## 2 0.5563 0.1303 0.1255 0.5431 0.1301 0.1255 8 From study (p. 35)
## 3 0.5238 0.1379 0.1333 0.5106 0.1377 0.1333 8 From study (p. 35)
## 4 -0.04184 0.1303 0.1303 -0.04082 0.1303 0.1303 8 From study (p. 35)
## icc icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1 Imputed 1 0.961 29.38 0.9743 0.4775 0.1702 0.1663
## 2 0.1 Imputed 1 0.961 29.38 0.9743 0.3518 0.1684 0.1663
## 3 0.1 Imputed 1 0.962 27.38 0.9724 0.7915 0.1848 0.1733
## 4 0.1 Imputed 1 0.96 28.46 0.9734 0.1303 0.1747 0.1744
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.4068 0.1691 0.1663 0.1835 0.03404 29.38 29.38 1 eta
## 2 0.5208 0.1709 0.1663 0.2346 0.03404 29.38 29.38 1 eta
## 3 0.4900 0.1777 0.1733 0.2240 0.03652 27.38 27.38 1 eta
## 4 -0.03910 0.1744 0.1744 -0.01755 0.03514 28.46 28.46 1 eta
## adj_value_DD vary_id
## <dbl> <chr>
## 1 1.325 SCL-90
## 2 1.325 BAI
## 3 1.3 BDI
## 4 1.339 IIP-64-C
# Study only provides raw means and standard errors for pre-measurements and only estimated marginal
# means with standard errors for post-measurements.
#NOT USED
Haslam2019 <- tibble(
group = rep(c("Group 4 health",
"TAU"), each = 1,5
),
outcome =rep(c(
"Loneliness",
"Depression",
"Social Anxiety",
"General practitioner vists",
"Multiple group memberships"
), each = 2,1),
N = rep(c(66,54), each = 1,5),
# Table 1, p. 791
m_pre = c(
25.13, 25.00,
20.82, 19.70,
3.39, 3.53,
1.41, 0.78,
1.75, 1.84
),
sd_pre = c(
3.11, 2.78,
9.96, 9.40,
1.11, 1.05,
1.65, 0.97,
0.86, 0.84
),
# Table 3, p. 796
emm_post = c(
20.40, 23.51,
17.66, 19.80,
3.02, 3.57,
2.19, 2.32,
2.65, 2.16
),
se_post = c(
0.42, 0.47,
1.19, 1.33,
0.08, 0.09,
0.27, 0.31,
0.10, 0.11
)
); Haslam2019
## # A tibble: 10 × 7
## group outcome N m_pre sd_pre emm_post se_post
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Group 4 health Loneliness 66 25.13 3.11 20.4 0.42
## 2 TAU Loneliness 54 25 2.78 23.51 0.47
## 3 Group 4 health Depression 66 20.82 9.96 17.66 1.19
## 4 TAU Depression 54 19.7 9.4 19.8 1.33
## 5 Group 4 health Social Anxiety 66 3.39 1.11 3.02 0.08
## 6 TAU Social Anxiety 54 3.53 1.05 3.57 0.09
## 7 Group 4 health General practitioner vists 66 1.41 1.65 2.19 0.27
## 8 TAU General practitioner vists 54 0.78 0.97 2.32 0.31
## 9 Group 4 health Multiple group memberships 66 1.75 0.86 2.65 0.1
## 10 TAU Multiple group memberships 54 1.84 0.84 2.16 0.11
# coefficients extracted from table 2, p. 794
# USED FOR META-ANALYSIS
Haslam2019_est <- tibble(
study = "Haslem 2019",
effect_size = "SMD",
sd_used = "Pooled pre-test SD - only SDs reported",
main_es_method = "Mixed-effects/multi-level model reg coef",
outcome = c(
"Loneliness",
"Depression",
"Social Anxiety",
"General practitioner vists",
"Multiple group memberships"
),
analysis_plan = case_when(
str_detect(outcome, "Loneliness") ~ "Loneliness",
str_detect(outcome, "Depression") ~ "All mental health outcomes/Depression",
str_detect(outcome, "Social Anxiety") ~ "All mental health outcomes",
str_detect(outcome, "General practitioner vists|Multiple group memberships") ~ "Unused outcomes",
.default = NA_character_
),
N_start_t = 66,
N_start_c = 54,
N_t = N_start_t,
N_c = N_start_c,
N_total = N_t + N_c,
df_ind = N_total,
# I have taken the beta values for the Time X Condition
b_reg = c(
-0.743,
-0.334,
-0.525,
-0.752,
0.523
),
se_b_reg = c(
0.218,
0.206,
0.169,
0.255,
0.197
),
sd_pre_t = c(3.11, 9.96, 1.11, 1.65, 0.86),
sd_pre_c = c(2.78, 9.40, 1.05, 0.97, 0.84),
sd_pool = sqrt(((N_t-1)*sd_pre_t^2 + (N_c-1)*sd_pre_c^2)/(N_t + N_c - 2)),
d_reg = b_reg/sd_pool,
vd_reg = (se_b_reg/sd_pool)^2 + d_reg^2/(2*N_total),
Wd_reg = (se_b_reg/sd_pool)^2,
J = 1 - 3/(4*df_ind-1),
g_reg = J * d_reg,
vg_reg = (se_b_reg/sd_pool)^2 + g_reg^2/(2*N_total),
Wg_reg = (se_b_reg/sd_pool)^2,
# icc (group-level) from study
icc = c(.054, .084, .034, .081, .056),
icc_type = "From study (Table 2, p. 794)",
) |>
rowwise() |>
mutate(
#"In the present study, the program was administered in groups comprising between five and nine participants" (p. 792)
avg_cl_size = 5,
avg_cl_type = "From study (p. 792)",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_reg = omega * d_reg * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_reg,
model = "reg_coef",
cluster_adj = TRUE,
SE = se_b_reg,
SD = sd_pool,
add_name_to_vars = "_reg",
vars = -var_term1_reg
),
vary_id = outcome
) |>
ungroup(); Haslam2019_est
## # A tibble: 5 × 43
## study effect_size sd_used
## <chr> <chr> <chr>
## 1 Haslem 2019 SMD Pooled pre-test SD - only SDs reported
## 2 Haslem 2019 SMD Pooled pre-test SD - only SDs reported
## 3 Haslem 2019 SMD Pooled pre-test SD - only SDs reported
## 4 Haslem 2019 SMD Pooled pre-test SD - only SDs reported
## 5 Haslem 2019 SMD Pooled pre-test SD - only SDs reported
## main_es_method outcome
## <chr> <chr>
## 1 Mixed-effects/multi-level model reg coef Loneliness
## 2 Mixed-effects/multi-level model reg coef Depression
## 3 Mixed-effects/multi-level model reg coef Social Anxiety
## 4 Mixed-effects/multi-level model reg coef General practitioner vists
## 5 Mixed-effects/multi-level model reg coef Multiple group memberships
## analysis_plan N_start_t N_start_c N_t N_c N_total
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Loneliness 66 54 66 54 120
## 2 All mental health outcomes/Depression 66 54 66 54 120
## 3 All mental health outcomes 66 54 66 54 120
## 4 Unused outcomes 66 54 66 54 120
## 5 Unused outcomes 66 54 66 54 120
## df_ind b_reg se_b_reg sd_pre_t sd_pre_c sd_pool d_reg vd_reg Wd_reg
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 120 -0.743 0.218 3.11 2.78 2.966 -0.2505 0.005662 0.005401
## 2 120 -0.334 0.206 9.96 9.4 9.712 -0.03439 0.0004548 0.0004499
## 3 120 -0.525 0.169 1.11 1.05 1.083 -0.4846 0.02531 0.02433
## 4 120 -0.752 0.255 1.65 0.97 1.386 -0.5424 0.03505 0.03383
## 5 120 0.523 0.197 0.86 0.84 0.8511 0.6145 0.05515 0.05358
## J g_reg vg_reg Wg_reg icc icc_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.9937 -0.2489 0.005659 0.005401 0.054 From study (Table 2, p. 794)
## 2 0.9937 -0.03417 0.0004547 0.0004499 0.084 From study (Table 2, p. 794)
## 3 0.9937 -0.4815 0.02530 0.02433 0.034 From study (Table 2, p. 794)
## 4 0.9937 -0.5390 0.03504 0.03383 0.081 From study (Table 2, p. 794)
## 5 0.9937 0.6107 0.05513 0.05358 0.056 From study (Table 2, p. 794)
## avg_cl_size avg_cl_type n_covariates gamma_sqrt df_adj omega gt_reg
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5 From study (p. 792) 1 0.987 117.2 0.9936 -0.2456
## 2 5 From study (p. 792) 1 0.98 115.9 0.9935 -0.03348
## 3 5 From study (p. 792) 1 0.992 117.7 0.9936 -0.4776
## 4 5 From study (p. 792) 1 0.98 116.1 0.9935 -0.5281
## 5 5 From study (p. 792) 1 0.986 117.1 0.9936 0.6020
## vgt_reg Wgt_reg hg_reg vhg_reg h_reg df_reg n_covariates_reg adj_fct_reg
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.005518 0.005261 -0.3104 0.008535 117.2 117.2 1 gamma
## 2 0.0004362 0.0004314 -0.1494 0.008625 115.9 115.9 1 gamma
## 3 0.02491 0.02394 -0.2827 0.008498 117.7 117.7 1 gamma
## 4 0.03371 0.03251 -0.2702 0.008614 116.1 116.1 1 gamma
## 5 0.05368 0.05213 0.2425 0.008540 117.1 117.1 1 gamma
## adj_value_reg vary_id
## <dbl> <chr>
## 1 0.974 Loneliness
## 2 0.959 Depression
## 3 0.984 Social Anxiety
## 4 0.961 General practitioner vists
## 5 0.973 Multiple group memberships
# Table 2, p. 181
Hilden2021 <- tibble(
outcome = rep(c(
"BSL-23 total",
"Overall Anxiety Severity and Impairment scale",
"Patient Health Questionnaire 9 scale",
"Alcohol Use Disorders Identification Test scale",
"Sheehan disability work or studylife",
"Sheehan disability social life",
"Sheehan disability family life"
), each = 2, 1),
group = rep(c(
"Schema therapy group",
"TAU"
), each = 1, 7),
N = rep(c(23,12), each = 1, 7),
N_start = rep(c(25,12), each = 1, 7),
m_pre = c(
39., 55.7,
11.3, 13.2,
14, 16.3,
6.4, 8.4,
6., 6.8,
5.2, 6.7,
5.2, 6.7),
sd_pre = c(
15.1, 14.9,
3.8, 2.6,
5.7, 4.1,
4.8, 5.6,
3.1, 2.3,
2.8, 1.6,
2.8, 1.6),
m_post = c(
32., 42.6,
10.3, 11.4,
5.7, 9.2,
11.9, 14.3,
5.2, 6.9,
5.6, 5.9,
4.9, 6.3),
sd_post = c(
16.4, 18.8,
3.9, 3.5,
5.5, 8.2,
5.2, 5.9,
3.3, 2.4,
2.6, 2.7,
2.9, 2.1)
)
# Making the tibble into wide format
Hilden2021_wide <-
Hilden2021 |>
mutate(group = case_when(
group == "Schema therapy group" ~ "t",
group == "TAU" ~ "c",
TRUE ~ NA_character_
)) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Hilden2021_est <-
Hilden2021_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "BSL-23 total") ~ "All mental health outcomes",
str_detect(outcome, "Overall Anxiety") ~ "All mental health outcomes/Anxiety",
str_detect(outcome, "Patient Health") ~ "Physical health",
str_detect(outcome, "Alcohol Use Disorders") ~ "Alcohol and drug abuse/misuse",
str_detect(outcome, "Sheehan disability") ~ "Social functioning (degree of impairment)",
TRUE ~ NA_character_
),
study = "Hilden et al. 2021",
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
# ppcor is imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
N_total = N_t + N_c,
df_ind = N_total,
# For Social functioning lower scores is beneficial, hence these are reverted
m_post = if_else(outcome %in% c("BSL-23 total",
"Patient Health Questionnaire 9 scale",
"Overall Anxiety Severity and Impairment scale",
"Alcohol Use Disorders Identification Test scale"),
(m_post_t - m_post_c) * -1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t - 1) * sd_post_t^2 + (N_c - 1) * sd_post_c^2) / (N_t + N_c - 2)),
d_post = m_post / sd_pool,
vd_post = (1 / N_t + 1 / N_c) + d_post^2 / (2 * df_ind),
Wd_post = (1 / N_t + 1 / N_c),
J = 1 - 3 / (4 * df_ind - 1),
g_post = J * d_post,
vg_post = (1 / N_t + 1 / N_c) + g_post^2 / (2 * df_ind),
Wg_post = Wd_post,
# For Social functioning lower scores is beneficial, hence these are reverted
m_diff_t = if_else(outcome %in% c("BSL-23 total",
"Patient Health Questionnaire 9 scale",
"Overall Anxiety Severity and Impairment scale",
"Alcohol Use Disorders Identification Test scale"),
(m_post_t - m_pre_t) * -1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome %in% c("BSL-23 total",
"Patient Health Questionnaire 9 scale",
"Overall Anxiety Severity and Impairment scale",
"Alcohol Use Disorders Identification Test scale"),
(m_post_c - m_pre_c) * -1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c) / sd_pool,
vd_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c) + d_DD^2 / (2 * df_ind),
Wd_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c),
g_DD = J * d_DD,
vg_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c) + g_DD^2 / (2 * df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
avg_cl_size = 6,
avg_cl_type = "From study (p. 177)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3 / (4 * df_adj - 1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c("vgt_post", "Wgt_post")
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -c("var_term1_DD")
)
) |>
ungroup() |>
mutate(
vary_id = outcome
)
Hilden2021_est
## # A tibble: 7 × 61
## outcome N_t N_c N_start_t
## <chr> <dbl> <dbl> <dbl>
## 1 BSL-23 total 23 12 25
## 2 Overall Anxiety Severity and Impairment scale 23 12 25
## 3 Patient Health Questionnaire 9 scale 23 12 25
## 4 Alcohol Use Disorders Identification Test scale 23 12 25
## 5 Sheehan disability work or studylife 23 12 25
## 6 Sheehan disability social life 23 12 25
## 7 Sheehan disability family life 23 12 25
## N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 12 39 55.7 15.1 14.9 32 42.6 16.4
## 2 12 11.3 13.2 3.8 2.6 10.3 11.4 3.9
## 3 12 14 16.3 5.7 4.1 5.7 9.2 5.5
## 4 12 6.4 8.4 4.8 5.6 11.9 14.3 5.2
## 5 12 6 6.8 3.1 2.3 5.2 6.9 3.3
## 6 12 5.2 6.7 2.8 1.6 5.6 5.9 2.6
## 7 12 5.2 6.7 2.8 1.6 4.9 6.3 2.9
## sd_post_c analysis_plan study
## <dbl> <chr> <chr>
## 1 18.8 All mental health outcomes Hilden et al. 2021
## 2 3.5 All mental health outcomes/Anxiety Hilden et al. 2021
## 3 8.2 Physical health Hilden et al. 2021
## 4 5.9 Alcohol and drug abuse/misuse Hilden et al. 2021
## 5 2.4 Social functioning (degree of impairment) Hilden et al. 2021
## 6 2.7 Social functioning (degree of impairment) Hilden et al. 2021
## 7 2.1 Social functioning (degree of impairment) Hilden et al. 2021
## effect_size sd_used main_es_method ppcor ppcor_method N_total
## <chr> <chr> <chr> <dbl> <chr> <dbl>
## 1 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## 2 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## 3 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## 4 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## 5 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## 6 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## 7 SMD Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 35
## df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 35 10.6 17.24 0.6150 0.1322 0.1268 0.9784 0.6017 0.1320 0.1268
## 2 35 1.1 3.771 0.2917 0.1280 0.1268 0.9784 0.2854 0.1280 0.1268
## 3 35 3.5 6.525 0.5364 0.1309 0.1268 0.9784 0.5248 0.1307 0.1268
## 4 35 2.4 5.443 0.4409 0.1296 0.1268 0.9784 0.4314 0.1295 0.1268
## 5 35 -1.7 3.030 -0.5611 0.1313 0.1268 0.9784 -0.5490 0.1311 0.1268
## 6 35 -0.3000 2.634 -0.1139 0.1270 0.1268 0.9784 -0.1114 0.1270 0.1268
## 7 35 -1.4 2.660 -0.5263 0.1308 0.1268 0.9784 -0.5149 0.1306 0.1268
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 7 13.1 -0.3539 0.1286 0.1268 -0.3462 0.1285 0.1268 6
## 2 1 1.800 -0.2121 0.1275 0.1268 -0.2075 0.1274 0.1268 6
## 3 8.3 7.1 0.1839 0.1273 0.1268 0.1799 0.1273 0.1268 6
## 4 -5.5 -5.9 0.07348 0.1269 0.1268 0.07190 0.1269 0.1268 6
## 5 -0.8 0.1000 -0.2970 0.1281 0.1268 -0.2906 0.1280 0.1268 6
## 6 0.4000 -0.8 0.4556 0.1298 0.1268 0.4458 0.1297 0.1268 6
## 7 -0.3000 -0.4000 0.03759 0.1268 0.1268 0.03678 0.1268 0.1268 6
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## 2 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## 3 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## 4 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## 5 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## 6 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## 7 From study (p. 177) 0.1 Imputed 1 0.975 32 0.9764
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5854 0.1456 0.1403 -0.3369 0.1420 0.1403 -0.1587 0.03125 32 32
## 2 0.2777 0.1415 0.1403 -0.2019 0.1409 0.1403 -0.09525 0.03125 32 32
## 3 0.5106 0.1443 0.1403 0.1751 0.1407 0.1403 0.08259 0.03125 32 32
## 4 0.4197 0.1430 0.1403 0.06995 0.1403 0.1403 0.03302 0.03125 32 32
## 5 -0.5341 0.1447 0.1403 -0.2828 0.1415 0.1403 -0.1333 0.03125 32 32
## 6 -0.1084 0.1404 0.1403 0.4337 0.1432 0.1403 0.2040 0.03125 32 32
## 7 -0.5010 0.1442 0.1403 0.03579 0.1403 0.1403 0.01689 0.03125 32 32
## n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <chr> <dbl>
## 1 1 eta 1.106
## 2 1 eta 1.106
## 3 1 eta 1.106
## 4 1 eta 1.106
## 5 1 eta 1.106
## 6 1 eta 1.106
## 7 1 eta 1.106
## vary_id
## <chr>
## 1 BSL-23 total
## 2 Overall Anxiety Severity and Impairment scale
## 3 Patient Health Questionnaire 9 scale
## 4 Alcohol Use Disorders Identification Test scale
## 5 Sheehan disability work or studylife
## 6 Sheehan disability social life
## 7 Sheehan disability family life
# From table 2, p. 174
Himle2014 <-
tibble(
group = as.factor(rep(c("Intervention group",
"Control group"),
each = 1, 12)),
timing = rep(c("Post","3m"), each = 12,1),
outcome = rep(c(
"LSAS -Total",
#"Work-related social anxiety- total",
"Brief fear of negative evaluation",
"Mini social phobia inventory",
"Beck anxiety inventory (BAI)",
"PHQ9 depression screen",
"Sheehan disability scale"
# "Social phobia symptom severity",
# "Clinician global impressions - symptom severity"
), each = 2, 2),
N = 29,
N_start = 29,
m_pre = rep(c(
84.31, 87.59,
# 18.72, 19.72,
46.59, 45.,
6.72, 7.52,
17.69, 22.9,
10.59, 12.17,
5.93, 6.07
# 2.07, 2.1,
# 4.59, 4.24)
),
each = 1,2),
sd_pre = rep(c(
31.51, 26.33,
# 7.42, 6.53,
12.83, 13.19,
2.2, 2.87,
12.83, 14.73,
8.08, 5.62,
2.6, 2.33
# .65, .62,
# 1.52, .99)
),
each = 1,2),
m_post = c(
#Postvalues
66.72, 90.62,
# 13.21, 19.76,
39.01, 43.07,
7.79, 9.66,
11.34, 24.72,
5.62, 10.41,
3.63, 4.77,
# 1.31, 2.17,
# 3.76, 4.14,
#3m follow-up
65.31, 92.79,
# 13.31, 19.31,
35.62, 44.,
7.48, 10.28,
12.83, 22.45,
5.83, 10.72,
3.48, 5.61
# 1.28, 2.21,
# 3.21, 4.21
),
## Standard deviation-values
sd_post = c(
# Post SD values
29.02, 36.67,
# 7.10, 7.83,
13.57, 14.48,
2.81, 2.58,
9.54, 17.10,
5.49, 6.92,
2.1, 2.02,
# .81, .66,
# 1.35, 1.27,
37.44, 36.26,
# 8.38, 7.72,
13.57, 12.57,
3.01, 1.28,
13.4, 14.96,
5.74, 6.68,
2.27, 2.38
# .84, .73,
# 1.35, 1.37
)
)
Himle2014_wide <-
Himle2014|>
mutate(group = case_match(group, "Intervention group" ~ "t", "Control group" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
relocate(outcome)
# Multi level effect estimates can be obtained from table 3, p. 3
Himle2014_est <-
Himle2014_wide |>
mutate(
# analysis_plan = rep(c(
# "the Liebowitz Social Anxiety Scale",
# "The Brief Fear of Negative Evaluation scale",
# "The Mini Social Phobia Inventory",
# "Beck Anxiety Inventory",
# "Patient Health Questionnaire (PHQ-9)",
# "Shehan disability scale"
# ), each = 2), # assuming there are two rows per each analysis_plan, adjust if necessary
analysis_plan = case_when(
str_detect(outcome, "LSAS|Mini|Brief") ~ "All mental health outcomes",
str_detect(outcome, "Beck") ~ "All mental health outcomes/Anxiety",
str_detect(outcome, "Sheehan") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "PHQ9") ~ "Physical health",
TRUE ~ NA_character_
),
study = "Himle et al. 2014"
) |>
mutate(
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
# ppcor is imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
N_total = N_t + N_c,
df_ind = N_total,
# MHV: ER VI HELT SIKRE PÅ DETTE?
# Reverting all outcomes
m_post = (m_post_t - m_post_c) * -1,
sd_pool = sqrt(((N_t - 1) * sd_post_t^2 + (N_c - 1) * sd_post_c^2) / (N_t + N_c - 2)),
d_post = m_post / sd_pool,
vd_post = (1 / N_t + 1 / N_c) + d_post^2 / (2 * df_ind),
Wd_post = (1 / N_t + 1 / N_c),
J = 1 - 3 / (4 * df_ind - 1),
g_post = J * d_post,
vg_post = (1 / N_t + 1 / N_c) + g_post^2 / (2 * df_ind),
Wg_post = Wd_post,
# Reverting all outcomes
m_diff_t = (m_post_t - m_pre_t) * -1,
m_diff_c = (m_post_c - m_pre_c) * -1,
d_DD = (m_diff_t - m_diff_c) / sd_pool,
vd_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c) + d_DD^2 / (2 * df_ind),
Wd_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c),
g_DD = J * d_DD,
vg_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c) + g_DD^2 / (2 * df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
avg_cl_size = 6,
avg_cl_type = "From study (p. 170)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3 / (4 * df_adj - 1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c("vgt_post", "Wgt_post")
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -c("var_term1_DD")
)
) |>
ungroup() |>
mutate(
vary_id = paste0(outcome, "/", timing)
)
Himle2014_est
## # A tibble: 12 × 62
## outcome timing N_t N_c N_start_t N_start_c
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 LSAS -Total Post 29 29 29 29
## 2 Brief fear of negative evaluation Post 29 29 29 29
## 3 Mini social phobia inventory Post 29 29 29 29
## 4 Beck anxiety inventory (BAI) Post 29 29 29 29
## 5 PHQ9 depression screen Post 29 29 29 29
## 6 Sheehan disability scale Post 29 29 29 29
## 7 LSAS -Total 3m 29 29 29 29
## 8 Brief fear of negative evaluation 3m 29 29 29 29
## 9 Mini social phobia inventory 3m 29 29 29 29
## 10 Beck anxiety inventory (BAI) 3m 29 29 29 29
## 11 PHQ9 depression screen 3m 29 29 29 29
## 12 Sheehan disability scale 3m 29 29 29 29
## m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 84.31 87.59 31.51 26.33 66.72 90.62 29.02 36.67
## 2 46.59 45 12.83 13.19 39.01 43.07 13.57 14.48
## 3 6.72 7.52 2.2 2.87 7.79 9.66 2.81 2.58
## 4 17.69 22.9 12.83 14.73 11.34 24.72 9.54 17.1
## 5 10.59 12.17 8.08 5.62 5.62 10.41 5.49 6.92
## 6 5.93 6.07 2.6 2.33 3.63 4.77 2.1 2.02
## 7 84.31 87.59 31.51 26.33 65.31 92.79 37.44 36.26
## 8 46.59 45 12.83 13.19 35.62 44 13.57 12.57
## 9 6.72 7.52 2.2 2.87 7.48 10.28 3.01 1.28
## 10 17.69 22.9 12.83 14.73 12.83 22.45 13.4 14.96
## 11 10.59 12.17 8.08 5.62 5.83 10.72 5.74 6.68
## 12 5.93 6.07 2.6 2.33 3.48 5.61 2.27 2.38
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 All mental health outcomes Himle et al. 2014 SMD
## 2 All mental health outcomes Himle et al. 2014 SMD
## 3 All mental health outcomes Himle et al. 2014 SMD
## 4 All mental health outcomes/Anxiety Himle et al. 2014 SMD
## 5 Physical health Himle et al. 2014 SMD
## 6 Social functioning (degree of impairment) Himle et al. 2014 SMD
## 7 All mental health outcomes Himle et al. 2014 SMD
## 8 All mental health outcomes Himle et al. 2014 SMD
## 9 All mental health outcomes Himle et al. 2014 SMD
## 10 All mental health outcomes/Anxiety Himle et al. 2014 SMD
## 11 Physical health Himle et al. 2014 SMD
## 12 Social functioning (degree of impairment) Himle et al. 2014 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind
## <chr> <chr> <dbl> <chr> <dbl> <dbl>
## 1 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 2 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 3 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 4 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 5 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 6 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 7 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 8 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 9 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 10 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 11 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## 12 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 58 58
## m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 23.9 33.07 0.7228 0.07347 0.06897 0.9870 0.7134 0.07335 0.06897 17.59
## 2 4.06 14.03 0.2893 0.06969 0.06897 0.9870 0.2856 0.06967 0.06897 7.580
## 3 1.87 2.697 0.6932 0.07311 0.06897 0.9870 0.6842 0.07300 0.06897 -1.07
## 4 13.38 13.85 0.9663 0.07702 0.06897 0.9870 0.9538 0.07681 0.06897 6.35
## 5 4.79 6.246 0.7669 0.07404 0.06897 0.9870 0.7569 0.07390 0.06897 4.97
## 6 1.14 2.060 0.5533 0.07160 0.06897 0.9870 0.5461 0.07154 0.06897 2.3
## 7 27.48 36.85 0.7456 0.07376 0.06897 0.9870 0.7359 0.07363 0.06897 19
## 8 8.38 13.08 0.6407 0.07250 0.06897 0.9870 0.6324 0.07241 0.06897 10.97
## 9 2.8 2.313 1.211 0.08160 0.06897 0.9870 1.195 0.08127 0.06897 -0.7600
## 10 9.62 14.20 0.6774 0.07292 0.06897 0.9870 0.6686 0.07282 0.06897 4.86
## 11 4.89 6.228 0.7852 0.07428 0.06897 0.9870 0.7750 0.07414 0.06897 4.76
## 12 2.13 2.326 0.9159 0.07620 0.06897 0.9870 0.9040 0.07601 0.06897 2.45
## m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -3.03 0.6236 0.07232 0.06897 0.6155 0.07223 0.06897 6
## 2 1.93 0.4026 0.07036 0.06897 0.3974 0.07033 0.06897 6
## 3 -2.14 0.3967 0.07032 0.06897 0.3915 0.07029 0.06897 6
## 4 -1.82 0.5901 0.07197 0.06897 0.5824 0.07189 0.06897 6
## 5 1.76 0.5139 0.07124 0.06897 0.5072 0.07118 0.06897 6
## 6 1.3 0.4853 0.07100 0.06897 0.4790 0.07094 0.06897 6
## 7 -5.2 0.6566 0.07268 0.06897 0.6481 0.07259 0.06897 6
## 8 1 0.7623 0.07397 0.06897 0.7524 0.07385 0.06897 6
## 9 -2.76 0.8647 0.07541 0.06897 0.8535 0.07525 0.06897 6
## 10 0.4500 0.3105 0.06980 0.06897 0.3065 0.06978 0.06897 6
## 11 1.45 0.5315 0.07140 0.06897 0.5246 0.07134 0.06897 6
## 12 0.46 0.8557 0.07528 0.06897 0.8446 0.07511 0.06897 6
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 2 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 3 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 4 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 5 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 6 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 7 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 8 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 9 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 10 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 11 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## 12 From study (p. 170) 0.1 Imputed 1 0.97 54.59 0.9862
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.6914 0.08714 0.08276 0.5965 0.08602 0.08276 0.2788 0.01832 54.59 54.59
## 2 0.2768 0.08346 0.08276 0.3852 0.08412 0.08276 0.1807 0.01832 54.59 54.59
## 3 0.6632 0.08679 0.08276 0.3795 0.08408 0.08276 0.1781 0.01832 54.59 54.59
## 4 0.9244 0.09059 0.08276 0.5645 0.08568 0.08276 0.2640 0.01832 54.59 54.59
## 5 0.7336 0.08769 0.08276 0.4916 0.08497 0.08276 0.2303 0.01832 54.59 54.59
## 6 0.5293 0.08532 0.08276 0.4643 0.08473 0.08276 0.2176 0.01832 54.59 54.59
## 7 0.7133 0.08742 0.08276 0.6281 0.08637 0.08276 0.2934 0.01832 54.59 54.59
## 8 0.6129 0.08620 0.08276 0.7292 0.08763 0.08276 0.3398 0.01832 54.59 54.59
## 9 1.158 0.09504 0.08276 0.8272 0.08903 0.08276 0.3844 0.01832 54.59 54.59
## 10 0.6480 0.08660 0.08276 0.2971 0.08357 0.08276 0.1395 0.01832 54.59 54.59
## 11 0.7511 0.08793 0.08276 0.5084 0.08513 0.08276 0.2381 0.01832 54.59 54.59
## 12 0.8761 0.08979 0.08276 0.8185 0.08890 0.08276 0.3805 0.01832 54.59 54.59
## n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <chr> <dbl>
## 1 1 eta 1.2
## 2 1 eta 1.2
## 3 1 eta 1.2
## 4 1 eta 1.2
## 5 1 eta 1.2
## 6 1 eta 1.2
## 7 1 eta 1.2
## 8 1 eta 1.2
## 9 1 eta 1.2
## 10 1 eta 1.2
## 11 1 eta 1.2
## 12 1 eta 1.2
## vary_id
## <chr>
## 1 LSAS -Total/Post
## 2 Brief fear of negative evaluation/Post
## 3 Mini social phobia inventory/Post
## 4 Beck anxiety inventory (BAI)/Post
## 5 PHQ9 depression screen/Post
## 6 Sheehan disability scale/Post
## 7 LSAS -Total/3m
## 8 Brief fear of negative evaluation/3m
## 9 Mini social phobia inventory/3m
## 10 Beck anxiety inventory (BAI)/3m
## 11 PHQ9 depression screen/3m
## 12 Sheehan disability scale/3m
# Rows 1-10 is data from Table 3, p. 10 and rows 11-22 is from Table 4 p. 13.
izquierdo2021 <- tibble(
group = as.factor(rep(c("Intervention",
"Control"),
each = 1,12)),
timing = rep(c(
"Post",
"3m",
"6m"
),
each = 8,1),
outcome = rep(c(
#"EE",
#"OE",
"CS",
"ACI",
"SCI",
#"POSIT",
#"NEGAT",
#"AFFECT",
#"DISOR",
#"DISORG",
"Total_score"),
each = 2,3),
N = rep(c(7)),
m_pre = rep(c(
# 6.57, 10.57, # EE
# 6.86, 8.29, # OE
13.43, 18.86,# CS
NA, NA, # ACI - Basline data not reported
NA, NA, # SCI - Basline data not reported
# 21.29, 15.14,# POSIT
# 10.57, 6.86, # NEGAT
# 35.86, 37.14,# AFFECT
# 5.00, 3.86, # DISOR
# 4.86, 2.43, # DISORG
77.57, 65.43 # Total_score
), each = 1,3),
sd_pre_reported = rep(c(
# 2.44, 3.36,
# 2.19, 1.38,
2.44, 4.34,
NA, NA,
NA, NA,
# 11.09, 5.84,
# 4.24, 2.54,
# 5.64, 4.56,
# 3.00, 3.18,
# 2.67, 1.90,
18.30, 10.85),
each = 1,3),
sd_pre = sd_pre_reported *sqrt(7),
m_post = c(
# post measurement
# 17.86, 10.57,
# 16.29, 8.14,
34.14, 18.71,
36.57, 11.14,
4.57, 1.14,
# 8.14, 15.71,
# 5.43, 7.71,
# 16.86, 37.00,
# 2.43, 3.86,
# 1.29, 1.57,
34.14, 65.86,
# 3 months measurement
# 16.00, 9.71,
# 16.29, 7.57,
32.29, 17.29,
37.57, 11.00,
4.57, 1.00,
# 7.14, 15.71,
# 5.00, 8.00,
# 13.29, 35.14,
# 2.57, 3.71,
# 1.00, 1.14,
29.00, 63.71,
# 6 months measurement
# 16.71, 9.71,
# 15.71, 6.86,
32.43, 16.57,
37.14, 11.57,
4.29, 1.14,
# 7.29, 15.29,
# 5.00, 8.29,
# 13.00, 36.14,
# 2.29, 3.57,
# 1.00, 1.29,
28.57, 64.57
),
sd_post_reported = c(
# post measurement
# 1.86, 3.15,
# 3.09, 1.35,
4.81, 2.87,
5.32, 3.19,
0.54, 0.38,
# 2.12, 6.40,
# 1.27, 3.45,
# 2.27, 3.74,
# 0.53, 2.54,
# 0.49, 0.79,
3.13, 11.13,
# 3 months measurement
# 3.21, 2.98,
# 2.63, 2.07,
5.28, 2.87,
4.20, 3.21,
0.53, 0.00,
# 1.07, 6.97,
# 0.82, 3.56,
# 0.95, 4.70,
# 0.79, 2.63,
# 0.00, 0.38,
1.83, 11.97,
# 6 months measurement
# 16.71, 9.71,
# 15.71, 6.86,
5.19, 2.88,
4.88, 2.94,
0.76, 0.38,
# 7.29, 15.29,
# 5.00, 8.29,
# 13.00, 36.14,
# 2.29, 3.57,
# 1.00, 1.29,
1.81, 9.68
),
sd_post = sd_post_reported * sqrt(7)
); izquierdo2021
## # A tibble: 24 × 10
## group timing outcome N m_pre sd_pre_reported sd_pre m_post
## <fct> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention Post CS 7 13.43 2.44 6.456 34.14
## 2 Control Post CS 7 18.86 4.34 11.48 18.71
## 3 Intervention Post ACI 7 NA NA NA 36.57
## 4 Control Post ACI 7 NA NA NA 11.14
## 5 Intervention Post SCI 7 NA NA NA 4.57
## 6 Control Post SCI 7 NA NA NA 1.14
## 7 Intervention Post Total_score 7 77.57 18.3 48.42 34.14
## 8 Control Post Total_score 7 65.43 10.85 28.71 65.86
## 9 Intervention 3m CS 7 13.43 2.44 6.456 32.29
## 10 Control 3m CS 7 18.86 4.34 11.48 17.29
## 11 Intervention 3m ACI 7 NA NA NA 37.57
## 12 Control 3m ACI 7 NA NA NA 11
## 13 Intervention 3m SCI 7 NA NA NA 4.57
## 14 Control 3m SCI 7 NA NA NA 1
## 15 Intervention 3m Total_score 7 77.57 18.3 48.42 29
## 16 Control 3m Total_score 7 65.43 10.85 28.71 63.71
## 17 Intervention 6m CS 7 13.43 2.44 6.456 32.43
## 18 Control 6m CS 7 18.86 4.34 11.48 16.57
## 19 Intervention 6m ACI 7 NA NA NA 37.14
## 20 Control 6m ACI 7 NA NA NA 11.57
## 21 Intervention 6m SCI 7 NA NA NA 4.29
## 22 Control 6m SCI 7 NA NA NA 1.14
## 23 Intervention 6m Total_score 7 77.57 18.3 48.42 28.57
## 24 Control 6m Total_score 7 65.43 10.85 28.71 64.57
## sd_post_reported sd_post
## <dbl> <dbl>
## 1 4.81 12.73
## 2 2.87 7.593
## 3 5.32 14.08
## 4 3.19 8.440
## 5 0.54 1.429
## 6 0.38 1.005
## 7 3.13 8.281
## 8 11.13 29.45
## 9 5.28 13.97
## 10 2.87 7.593
## 11 4.2 11.11
## 12 3.21 8.493
## 13 0.53 1.402
## 14 0 0
## 15 1.83 4.842
## 16 11.97 31.67
## 17 5.19 13.73
## 18 2.88 7.620
## 19 4.88 12.91
## 20 2.94 7.779
## 21 0.76 2.011
## 22 0.38 1.005
## 23 1.81 4.789
## 24 9.68 25.61
# Turning data into wide format
params <- tibble(
filter_val1 = rep(c("Post", paste0(c(3, 6), "m")), 1)
)
wide_izquierdo2021_func <-
function(filter_val1){
izquierdo2021 |>
filter(timing == filter_val1) |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
}
izquierdo2021_est <-
pmap(params, wide_izquierdo2021_func) |>
list_rbind() |>
mutate(
analysis_plan = rep(
c("Hope, Empowerment & Self-efficacy",
"Social functioning (degree of impairment)",
"Social functioning (degree of impairment)",
"All mental health outcomes" # Total score
), each = 1,3),
study = "Izquierdo et al. 2021",
N_total = N_t + N_c,
df_ind = N_total,
# Reverting m_post only for Total_score
m_post = if_else(outcome == "Total_score", (m_post_t - m_post_c) * -1, m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
#sd_pool = sqrt(((N_t-1)*sd_post_reported_t^2 + (N_c-1)*sd_post_reported_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
vary_id = paste0(outcome, "/", timing)
) |>
ungroup()
Jacob2010 <- tibble(
group = as.factor(rep(c("Intervention", "Control"), each = 1, 10)),
timing = rep(c("Post","6m"), each = 10,1),
outcome = rep(c(
"RSES",
"SSES Achievement",
"SSES Social",
"SSES Appearance",
"BDI"), each = 2, 2),
N = rep(c(19, 24), each = 1,10),
N_start = rep(c(19, 24), each = 1,10),
m_pre = rep(c(
13.3, 13.3, # Social Cognition Screening Questionnaire
18.7, 19.2, # Brief Assessment of Cognition in Schizophrenia
13.8, 16.3, # Positive and Negative Syndrome Scale
11.7, 10.8, # Global Assessment of Functioning
27.8, 30.0) # Social Functioning Scale
, each = 1,2),
sd_pre = rep(c(
8.6, 9.9,
4., 6.6,
6.6, 7.4,
5.7, 5.2,
11.8, 12.2)
, each = 1,2),
m_post = c(
# Post measurement
16.7, 11.6,
20.7, 18.1,
14.5, 16.,
11.6, 10.4,
22.6, 30.9,
# 6 months measurement
17.8, 13.2,
21.5, 19.1,
15.3, 16.,
11.7, 11.5,
22.6, 29.6),
sd_post = c(
# Post measurement
10.3, 9.3,
6.3, 6.9,
7.0, 7.2,
5.4, 5.3,
13.1, 12.3,
# 6 months measurement
11., 11.2,
6.4, 6.3,
8., 7.4,
5.2, 5.7,
14.5, 13.3)
) |>
relocate(outcome, .after = group); Jacob2010
## # A tibble: 20 × 9
## group outcome timing N N_start m_pre sd_pre m_post
## <fct> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention RSES Post 19 19 13.3 8.6 16.7
## 2 Control RSES Post 24 24 13.3 9.9 11.6
## 3 Intervention SSES Achievement Post 19 19 18.7 4 20.7
## 4 Control SSES Achievement Post 24 24 19.2 6.6 18.1
## 5 Intervention SSES Social Post 19 19 13.8 6.6 14.5
## 6 Control SSES Social Post 24 24 16.3 7.4 16
## 7 Intervention SSES Appearance Post 19 19 11.7 5.7 11.6
## 8 Control SSES Appearance Post 24 24 10.8 5.2 10.4
## 9 Intervention BDI Post 19 19 27.8 11.8 22.6
## 10 Control BDI Post 24 24 30 12.2 30.9
## 11 Intervention RSES 6m 19 19 13.3 8.6 17.8
## 12 Control RSES 6m 24 24 13.3 9.9 13.2
## 13 Intervention SSES Achievement 6m 19 19 18.7 4 21.5
## 14 Control SSES Achievement 6m 24 24 19.2 6.6 19.1
## 15 Intervention SSES Social 6m 19 19 13.8 6.6 15.3
## 16 Control SSES Social 6m 24 24 16.3 7.4 16
## 17 Intervention SSES Appearance 6m 19 19 11.7 5.7 11.7
## 18 Control SSES Appearance 6m 24 24 10.8 5.2 11.5
## 19 Intervention BDI 6m 19 19 27.8 11.8 22.6
## 20 Control BDI 6m 24 24 30 12.2 29.6
## sd_post
## <dbl>
## 1 10.3
## 2 9.3
## 3 6.3
## 4 6.9
## 5 7
## 6 7.2
## 7 5.4
## 8 5.3
## 9 13.1
## 10 12.3
## 11 11
## 12 11.2
## 13 6.4
## 14 6.3
## 15 8
## 16 7.4
## 17 5.2
## 18 5.7
## 19 14.5
## 20 13.3
# Making the druss2018 tibble wide in order to estimate the effect sizes and
# further analysis.
# Turning data into wide format
Jacob2010_wide <-
Jacob2010 |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Jacob2010_est <-
Jacob2010_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "BDI") ~ "All mental health outcomes/Depression",
str_detect(outcome, "RSES|SSES") ~ "Self-esteem",
.default = NA_character_
),
study = c("Jacob et al. 2010"),
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
N_total = N_t + N_c,
df_ind = N_total,
# Reverting all outcomes
# Reverting m_post for specific outcomes
m_post = if_else(outcome == "BDI", (m_post_t - m_post_c) * -1, m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Reverting m_post for specific outcomes: BDI
m_diff_t = if_else(outcome == "BDI",
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome == "BDI",
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) ,
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Average cluster size in treatment group
# Group size was between 5 to 7 (p. 379)
avg_cl_size = 6,
avg_cl_type = "From study (p. 379)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)
) |>
ungroup() |>
mutate(vary_id = paste0(outcome, "/", timing)); Jacob2010_est
## # A tibble: 10 × 62
## outcome timing N_t N_c N_start_t N_start_c m_pre_t m_pre_c
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 RSES Post 19 24 19 24 13.3 13.3
## 2 SSES Achievement Post 19 24 19 24 18.7 19.2
## 3 SSES Social Post 19 24 19 24 13.8 16.3
## 4 SSES Appearance Post 19 24 19 24 11.7 10.8
## 5 BDI Post 19 24 19 24 27.8 30
## 6 RSES 6m 19 24 19 24 13.3 13.3
## 7 SSES Achievement 6m 19 24 19 24 18.7 19.2
## 8 SSES Social 6m 19 24 19 24 13.8 16.3
## 9 SSES Appearance 6m 19 24 19 24 11.7 10.8
## 10 BDI 6m 19 24 19 24 27.8 30
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 8.6 9.9 16.7 11.6 10.3 9.3
## 2 4 6.6 20.7 18.1 6.3 6.9
## 3 6.6 7.4 14.5 16 7 7.2
## 4 5.7 5.2 11.6 10.4 5.4 5.3
## 5 11.8 12.2 22.6 30.9 13.1 12.3
## 6 8.6 9.9 17.8 13.2 11 11.2
## 7 4 6.6 21.5 19.1 6.4 6.3
## 8 6.6 7.4 15.3 16 8 7.4
## 9 5.7 5.2 11.7 11.5 5.2 5.7
## 10 11.8 12.2 22.6 29.6 14.5 13.3
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 Self-esteem Jacob et al. 2010 SMD
## 2 Self-esteem Jacob et al. 2010 SMD
## 3 Self-esteem Jacob et al. 2010 SMD
## 4 Self-esteem Jacob et al. 2010 SMD
## 5 All mental health outcomes/Depression Jacob et al. 2010 SMD
## 6 Self-esteem Jacob et al. 2010 SMD
## 7 Self-esteem Jacob et al. 2010 SMD
## 8 Self-esteem Jacob et al. 2010 SMD
## 9 Self-esteem Jacob et al. 2010 SMD
## 10 All mental health outcomes/Depression Jacob et al. 2010 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind
## <chr> <chr> <dbl> <chr> <dbl> <dbl>
## 1 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 2 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 3 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 4 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 5 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 6 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 7 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 8 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 9 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## 10 Pooled posttest SDs Raw diff-in-diffs 0.5 Imputed 43 43
## m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.1 9.752 0.5230 0.09748 0.09430 0.9825 0.5138 0.09737 0.09430
## 2 2.600 6.643 0.3914 0.09608 0.09430 0.9825 0.3845 0.09602 0.09430
## 3 -1.5 7.113 -0.2109 0.09482 0.09430 0.9825 -0.2072 0.09480 0.09430
## 4 1.200 5.344 0.2245 0.09488 0.09430 0.9825 0.2206 0.09486 0.09430
## 5 8.3 12.66 0.6557 0.09930 0.09430 0.9825 0.6442 0.09912 0.09430
## 6 4.6 11.11 0.4139 0.09629 0.09430 0.9825 0.4067 0.09622 0.09430
## 7 2.400 6.344 0.3783 0.09596 0.09430 0.9825 0.3717 0.09590 0.09430
## 8 -0.7000 7.669 -0.09127 0.09440 0.09430 0.9825 -0.08967 0.09439 0.09430
## 9 0.2000 5.486 0.03646 0.09431 0.09430 0.9825 0.03582 0.09431 0.09430
## 10 7 13.84 0.5058 0.09727 0.09430 0.9825 0.4969 0.09717 0.09430
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3.4 -1.700 0.5230 0.09748 0.09430 0.5138 0.09737 0.09430
## 2 2 -1.100 0.4666 0.09683 0.09430 0.4585 0.09674 0.09430
## 3 0.7000 -0.3000 0.1406 0.09453 0.09430 0.1381 0.09452 0.09430
## 4 -0.1000 -0.4000 0.05614 0.09433 0.09430 0.05515 0.09433 0.09430
## 5 5.2 -0.9000 0.4819 0.09700 0.09430 0.4735 0.09690 0.09430
## 6 4.5 -0.1000 0.4139 0.09629 0.09430 0.4067 0.09622 0.09430
## 7 2.8 -0.1000 0.4571 0.09673 0.09430 0.4491 0.09664 0.09430
## 8 1.5 -0.3000 0.2347 0.09494 0.09430 0.2306 0.09492 0.09430
## 9 0 0.7000 -0.1276 0.09449 0.09430 -0.1254 0.09448 0.09430
## 10 5.2 0.4000 0.3468 0.09570 0.09430 0.3407 0.09565 0.09430
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 2 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 3 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 4 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 5 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 6 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 7 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 8 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 9 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## 10 6 From study (p. 379) 0.1 Imputed 1 0.965 40.17
## omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9812 0.4952 0.1195 0.1165 0.4952 0.1195 0.1165 0.2280 0.02489
## 2 0.9812 0.3706 0.1182 0.1165 0.4418 0.1189 0.1165 0.2036 0.02489
## 3 0.9812 -0.1997 0.1170 0.1165 0.1331 0.1167 0.1165 0.06153 0.02489
## 4 0.9812 0.2126 0.1170 0.1165 0.05315 0.1165 0.1165 0.02457 0.02489
## 5 0.9812 0.6209 0.1213 0.1165 0.4563 0.1191 0.1165 0.2102 0.02489
## 6 0.9812 0.3920 0.1184 0.1165 0.3920 0.1184 0.1165 0.1807 0.02489
## 7 0.9812 0.3582 0.1181 0.1165 0.4328 0.1188 0.1165 0.1995 0.02489
## 8 0.9812 -0.08642 0.1166 0.1165 0.2222 0.1171 0.1165 0.1027 0.02489
## 9 0.9812 0.03452 0.1165 0.1165 -0.1208 0.1166 0.1165 -0.05584 0.02489
## 10 0.9812 0.4789 0.1193 0.1165 0.3284 0.1178 0.1165 0.1515 0.02489
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 40.17 40.17 1 eta 1.235 RSES/Post
## 2 40.17 40.17 1 eta 1.235 SSES Achievement/Post
## 3 40.17 40.17 1 eta 1.235 SSES Social/Post
## 4 40.17 40.17 1 eta 1.235 SSES Appearance/Post
## 5 40.17 40.17 1 eta 1.235 BDI/Post
## 6 40.17 40.17 1 eta 1.235 RSES/6m
## 7 40.17 40.17 1 eta 1.235 SSES Achievement/6m
## 8 40.17 40.17 1 eta 1.235 SSES Social/6m
## 9 40.17 40.17 1 eta 1.235 SSES Appearance/6m
## 10 40.17 40.17 1 eta 1.235 BDI/6m
James2004 <- tibble(
group = rep(c("Treatment", "Control"), each = 1,5),
outcome = rep(c("BPRS", "BSI-Global","DAST", "AUDIT","SDS"
), each = 2,1),
N = c(
29, 29,
31, 29,
29,29,
29, 29,
28, 29
),
N_start = rep(c(
32,31
), each = 1,5),
m_pre = c(
35.41, 33.93, # BPRS
1.36, 1.27, # BSI-Global
11.58, 9.10, # DAST
11.65, 12.65, # AUDIT
7.42, 6.75 # SDS
),
sd_pre = c(
11.08, 8.61,
0.88, 0.63,
4.82, 4.66,
10.19, 8.22,
3.63, 3.46
),
m_post = c(
30.48, 38.10,
0.87, 1.12,
4.96, 8.24,
8.34, 11.65,
3.85, 5.20
),
sd_post = c(
10.68, 11.54,
0.63, 0.77,
4.49, 5.31,
8.35, 7.35,
3.30, 3.85
)
)
# Turning data into wide format
James2004_wide <- James2004 |>
mutate(group = case_match(group, "Treatment" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
); James2004_wide
## # A tibble: 5 × 13
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BPRS 29 29 32 31 35.41 33.93 11.08 8.61
## 2 BSI-Global 31 29 32 31 1.36 1.27 0.88 0.63
## 3 DAST 29 29 32 31 11.58 9.1 4.82 4.66
## 4 AUDIT 29 29 32 31 11.65 12.65 10.19 8.22
## 5 SDS 28 29 32 31 7.42 6.75 3.63 3.46
## m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl>
## 1 30.48 38.1 10.68 11.54
## 2 0.87 1.12 0.63 0.77
## 3 4.96 8.24 4.49 5.31
## 4 8.34 11.65 8.35 7.35
## 5 3.85 5.2 3.3 3.85
James2004_est <- James2004_wide |>
mutate(
study = "James et al. 2004",
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
analysis_plan = case_when(
str_detect(outcome, "BPRS|BSI-Global") ~ "All mental health outcomes",
str_detect(outcome, "DAST|AUDIT|SDS") ~ "Alcohol and drug abuse/misuse",
.default = NA_character_
),
# F-values taken from table 2, p. 988.
F_val = c(
7.364, 0.865, 16.221, 1.352, 2.205
),
ppcor_method = "F-values are used",
N_total = N_t + N_c,
df_ind = N_total,
# For all scores lower are benefical
m_post = (m_post_t - m_post_c)*-1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = d_DD^2/F_val + d_DD^2/(2*df_ind),
Wd_DD = d_DD^2/F_val,
g_DD = J * d_DD,
vg_DD = g_DD^2/F_val + g_DD^2/(2*df_ind),
Wg_DD = g_DD^2/F_val
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group was approx. 6, p. 985
avg_cl_size = 6,
avg_cl_type = "From study (p. 985)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); James2004_est
## # A tibble: 5 × 61
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BPRS 29 29 32 31 35.41 33.93 11.08 8.61
## 2 BSI-Global 31 29 32 31 1.36 1.27 0.88 0.63
## 3 DAST 29 29 32 31 11.58 9.1 4.82 4.66
## 4 AUDIT 29 29 32 31 11.65 12.65 10.19 8.22
## 5 SDS 28 29 32 31 7.42 6.75 3.63 3.46
## m_post_t m_post_c sd_post_t sd_post_c study effect_size
## <dbl> <dbl> <dbl> <dbl> <chr> <chr>
## 1 30.48 38.1 10.68 11.54 James et al. 2004 SMD
## 2 0.87 1.12 0.63 0.77 James et al. 2004 SMD
## 3 4.96 8.24 4.49 5.31 James et al. 2004 SMD
## 4 8.34 11.65 8.35 7.35 James et al. 2004 SMD
## 5 3.85 5.2 3.3 3.85 James et al. 2004 SMD
## sd_used main_es_method analysis_plan F_val
## <chr> <chr> <chr> <dbl>
## 1 Pooled posttest SDs Raw diff-in-diffs All mental health outcomes 7.364
## 2 Pooled posttest SDs Raw diff-in-diffs All mental health outcomes 0.865
## 3 Pooled posttest SDs Raw diff-in-diffs Alcohol and drug abuse/misuse 16.22
## 4 Pooled posttest SDs Raw diff-in-diffs Alcohol and drug abuse/misuse 1.352
## 5 Pooled posttest SDs Raw diff-in-diffs Alcohol and drug abuse/misuse 2.205
## ppcor_method N_total df_ind m_post sd_pool d_post vd_post Wd_post J
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 F-values are used 58 58 7.62 11.12 0.6854 0.07301 0.06897 0.9870
## 2 F-values are used 60 60 0.25 0.7011 0.3566 0.06780 0.06674 0.9874
## 3 F-values are used 58 58 3.28 4.917 0.6671 0.07280 0.06897 0.9870
## 4 F-values are used 58 58 3.31 7.866 0.4208 0.07049 0.06897 0.9870
## 5 F-values are used 57 57 1.35 3.591 0.3760 0.07144 0.07020 0.9868
## g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.6765 0.07291 0.06897 4.930 -4.17 0.8185 0.09674 0.09097 0.8078 0.09425
## 2 0.3521 0.06777 0.06674 0.49 0.1500 0.4850 0.2739 0.2719 0.4789 0.2670
## 3 0.6584 0.07270 0.06897 6.62 0.8600 1.171 0.09642 0.08460 1.156 0.09394
## 4 0.4153 0.07045 0.06897 3.31 1 0.2937 0.06453 0.06379 0.2899 0.06287
## 5 0.3710 0.07140 0.07020 3.57 1.55 0.5626 0.1463 0.1435 0.5552 0.1425
## Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt
## <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.08862 6 From study (p. 985) 0.1 Imputed 1 0.97
## 2 0.2651 6 From study (p. 985) 0.1 Imputed 1 0.971
## 3 0.08241 6 From study (p. 985) 0.1 Imputed 1 0.97
## 4 0.06214 6 From study (p. 985) 0.1 Imputed 1 0.97
## 5 0.1398 6 From study (p. 985) 0.1 Imputed 1 0.97
## df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 54.24 0.9861 0.6556 0.08669 0.08276 0.7829 0.1055 0.09988 0.3322 0.01832
## 2 56.08 0.9866 0.3416 0.08045 0.07942 0.4646 0.2988 0.2969 0.1133 0.01771
## 3 54.24 0.9861 0.6381 0.08649 0.08276 1.120 0.1044 0.09288 0.4879 0.01832
## 4 54.24 0.9861 0.4025 0.08424 0.08276 0.2809 0.07076 0.07004 0.1434 0.01832
## 5 53.31 0.9859 0.3596 0.08579 0.08459 0.5380 0.1609 0.1582 0.1842 0.01864
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 54.59 54.59 1 eta 1.2 BPRS
## 2 56.48 56.48 1 eta 1.19 BSI-Global
## 3 54.59 54.59 1 eta 1.2 DAST
## 4 54.59 54.59 1 eta 1.2 AUDIT
## 5 53.64 53.64 1 eta 1.205 SDS
# Taken from table 4, p. 8
Kanie2019 <- tibble(
group = as.factor(rep(c("SCIT", "TAU"), each = 1,5)),
timing = "Post",
outcome = rep(c(
"SCSQ total", # Social Cognition Screening Questionnaire
"BACS", # Brief Assessment of Cognition in Schizophrenia
"PANSS total", # Positive and Negative Syndrome Scale
"GAF", # Global Assessment of Functioning
"SFS" # Social Functioning Scale
), each = 2,1),
N = rep(c(32, 29), 5), #MHV Check if you agree that it should be 29 participant in the control
N_start = 36,
m_pre = c(
31.04, 32.83, # Social Cognition Screening Questionnaire
-1.64, -1.33, # Brief Assessment of Cognition in Schizophrenia
64.78, 63.78, # Positive and Negative Syndrome Scale
51.59, 53.44, # Global Assessment of Functioning
116.06, 106.53 # Social Functioning Scale
),
sd_pre = c(
3.58, 3.47,
1.01, 1.42,
18.18, 18.98,
8.81, 9.49,
23.95, 23.47),
m_post = c(
# 3 months measurement - This is a midterm measurement/during-the-intervention measure
# 32.94, 33.45,
# -1.37, -1.16,
# 61.34, 59.94,
# 52.25, 58.06,
# 118.44, 107.41,
# 6 months measurement
32.79, 33.4,
-1.13, -0.77,
60.03, 59.81,
56.09, 55.59,
117.45, 108.91
),
sd_post = c(
# 3 months measurement This is a midterm measurement/during-the-intervention measure
# 3.2, 2.63,
# 1.09, 1.36,
# 19.15, 18.02,
# 13.63, 13.47,
# 25.31, 28.03,
# 6 months measurement
3.17, 2.63,
1.22, 1.35,
18.68, 17.32,
15.33, 14.5,
25.42, 26.6
)
); Kanie2019
## # A tibble: 10 × 9
## group timing outcome N N_start m_pre sd_pre m_post sd_post
## <fct> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SCIT Post SCSQ total 32 36 31.04 3.58 32.79 3.17
## 2 TAU Post SCSQ total 29 36 32.83 3.47 33.4 2.63
## 3 SCIT Post BACS 32 36 -1.64 1.01 -1.13 1.22
## 4 TAU Post BACS 29 36 -1.33 1.42 -0.77 1.35
## 5 SCIT Post PANSS total 32 36 64.78 18.18 60.03 18.68
## 6 TAU Post PANSS total 29 36 63.78 18.98 59.81 17.32
## 7 SCIT Post GAF 32 36 51.59 8.81 56.09 15.33
## 8 TAU Post GAF 29 36 53.44 9.49 55.59 14.5
## 9 SCIT Post SFS 32 36 116.1 23.95 117.4 25.42
## 10 TAU Post SFS 29 36 106.5 23.47 108.9 26.6
# Turning data into wide format
Kanie2019_wide <- Kanie2019 |>
mutate(group = case_match(group, "SCIT" ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
# Obtained from last column of Table 4 (p. 8)
# MHV: Check if these turn the right way in interpretation relative to how we convert them
es_paper = c(0.33, -0.05, -0.04, 0.26, -0.04),
es_paper_type = "DiD"
); Kanie2019_wide
## # A tibble: 5 × 16
## timing outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Post SCSQ total 32 29 36 36 31.04 32.83 3.58
## 2 Post BACS 32 29 36 36 -1.64 -1.33 1.01
## 3 Post PANSS total 32 29 36 36 64.78 63.78 18.18
## 4 Post GAF 32 29 36 36 51.59 53.44 8.81
## 5 Post SFS 32 29 36 36 116.1 106.5 23.95
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c es_paper es_paper_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 3.47 32.79 33.4 3.17 2.63 0.33 DiD
## 2 1.42 -1.13 -0.77 1.22 1.35 -0.05 DiD
## 3 18.98 60.03 59.81 18.68 17.32 -0.04 DiD
## 4 9.49 56.09 55.59 15.33 14.5 0.26 DiD
## 5 23.47 117.4 108.9 25.42 26.6 -0.04 DiD
Kanie2019_est <-
Kanie2019_wide |>
mutate(
study = "Kanie et al. 2019",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
analysis_plan = case_when(
str_detect(outcome, "SCSQ") ~ "Unused",
str_detect(outcome, "BACS") ~ "All mental health outcomes",
str_detect(outcome, "SFS|GAF") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "PANSS") ~ "All mental health outcomes/Symptoms of psychosis",
.default = NA_character_
),
# ppcor is imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
N_total = N_t + N_c,
df_ind = N_total,
# For PANSS: reverted
m_post = if_else(
outcome != "PANSS total",
(m_post_t - m_post_c)*-1,
m_post_t - m_post_c
),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For PANSS: reverted
m_diff_t = if_else(
outcome != "PANSS total",
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t
),
m_diff_c = if_else(
outcome != "PANSS total",
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c
),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Group size was between 4 to 8 (p. 3)
avg_cl_size = 6,
avg_cl_type = "From study (p. 3)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
gt_DD_pop = if_else(
str_detect(outcome, "GAF"),
omega * ((m_diff_t - m_diff_c)/GAF_pop_res$sd_population_GAF) * gamma_sqrt,
NA_real_
),
# Calculated from Eq. 28 (Fitzgerald & Tipton, 2024)
vgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD) + g_DD^2/(2*GAF_pop_res$df_pop),
NA_real_
),
Wgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD),
NA_real_
),
vary_id = paste0(outcome)
) |>
ungroup(); Kanie2019_est
## # A tibble: 5 × 67
## timing outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Post SCSQ total 32 29 36 36 31.04 32.83 3.58
## 2 Post BACS 32 29 36 36 -1.64 -1.33 1.01
## 3 Post PANSS total 32 29 36 36 64.78 63.78 18.18
## 4 Post GAF 32 29 36 36 51.59 53.44 8.81
## 5 Post SFS 32 29 36 36 116.1 106.5 23.95
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c es_paper es_paper_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 3.47 32.79 33.4 3.17 2.63 0.33 DiD
## 2 1.42 -1.13 -0.77 1.22 1.35 -0.05 DiD
## 3 18.98 60.03 59.81 18.68 17.32 -0.04 DiD
## 4 9.49 56.09 55.59 15.33 14.5 0.26 DiD
## 5 23.47 117.4 108.9 25.42 26.6 -0.04 DiD
## study effect_size sd_used main_es_method
## <chr> <chr> <chr> <chr>
## 1 Kanie et al. 2019 SMD Pooled posttest SD Raw diff-in-diffs
## 2 Kanie et al. 2019 SMD Pooled posttest SD Raw diff-in-diffs
## 3 Kanie et al. 2019 SMD Pooled posttest SD Raw diff-in-diffs
## 4 Kanie et al. 2019 SMD Pooled posttest SD Raw diff-in-diffs
## 5 Kanie et al. 2019 SMD Pooled posttest SD Raw diff-in-diffs
## analysis_plan ppcor ppcor_method N_total
## <chr> <dbl> <chr> <dbl>
## 1 Unused 0.5 Imputed 61
## 2 All mental health outcomes 0.5 Imputed 61
## 3 All mental health outcomes/Symptoms of psychosis 0.5 Imputed 61
## 4 Social functioning (degree of impairment) 0.5 Imputed 61
## 5 Social functioning (degree of impairment) 0.5 Imputed 61
## df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 61 0.6100 2.926 0.2085 0.06609 0.06573 0.9877 0.2059 0.06608
## 2 61 0.36 1.283 0.2805 0.06638 0.06573 0.9877 0.2771 0.06636
## 3 61 0.2200 18.05 0.01219 0.06573 0.06573 0.9877 0.01204 0.06573
## 4 61 -0.5 14.94 -0.03346 0.06574 0.06573 0.9877 -0.03305 0.06574
## 5 61 -8.540 25.99 -0.3286 0.06662 0.06573 0.9877 -0.3246 0.06660
## Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.06573 -1.75 -0.57 -0.4033 0.06707 0.06573 -0.3983 0.06703 0.06573
## 2 0.06573 -0.51 -0.56 0.03896 0.06575 0.06573 0.03848 0.06574 0.06573
## 3 0.06573 -4.75 -3.97 -0.04322 0.06575 0.06573 -0.04269 0.06575 0.06573
## 4 0.06573 -4.5 -2.150 -0.1573 0.06594 0.06573 -0.1553 0.06593 0.06573
## 5 0.06573 -1.39 -2.380 0.03810 0.06574 0.06573 0.03763 0.06574 0.06573
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 6 From study (p. 3) 0.1 Imputed 1 0.972 57.42
## 2 6 From study (p. 3) 0.1 Imputed 1 0.972 57.42
## 3 6 From study (p. 3) 0.1 Imputed 1 0.972 57.42
## 4 6 From study (p. 3) 0.1 Imputed 1 0.972 57.42
## 5 6 From study (p. 3) 0.1 Imputed 1 0.972 57.42
## omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9869 0.2000 0.07824 0.07789 -0.3868 0.07920 0.07789 -0.1824 0.01742
## 2 0.9869 0.2691 0.07852 0.07789 0.03737 0.07791 0.07789 0.01767 0.01742
## 3 0.9869 0.01169 0.07789 0.07789 -0.04146 0.07791 0.07789 -0.01960 0.01742
## 4 0.9869 -0.03210 0.07790 0.07789 -0.1509 0.07809 0.07789 -0.07131 0.01742
## 5 0.9869 -0.3152 0.07876 0.07789 0.03654 0.07790 0.07789 0.01728 0.01742
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD gt_DD_pop vgt_DD_pop
## <dbl> <dbl> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 57.42 57.42 1 eta 1.185 NA NA
## 2 57.42 57.42 1 eta 1.185 NA NA
## 3 57.42 57.42 1 eta 1.185 NA NA
## 4 57.42 57.42 1 eta 1.185 -0.1780 0.07532
## 5 57.42 57.42 1 eta 1.185 NA NA
## Wgt_DD_pop vary_id
## <dbl> <chr>
## 1 NA SCSQ total
## 2 NA BACS
## 3 NA PANSS total
## 4 0.07527 GAF
## 5 NA SFS
# Data from table 2 (p.5) containing means, standard deviation and ANOVA estimations
# with F-values and η2. Table 3 (p.6) has the same values but with ANCOVAS (i.e. indcludes covariates)
Lim2020 <- tibble(
group = as.factor(rep(c("Social Cognitive Skills Training",
"Treatment as Usual"), each = 1,6)),
outcome = as.factor(rep(c(
"Social Functioning (QLS)",
"PANSS Negative",
"PANSS Excitement",
"PANSS Cognitive",
"PANSS Positive",
"PANSS Depressive"
), each = 2,1 )
),
N = rep(c(18, 21), 6),
N_start = rep(c(21, 24), 6),
m_pre = c(46.15, 61.74, # Social Functioning (QLS) total
18.22, 16.57, # PANSS Negative
6.28, 6.91, # PANSS Excitement
13.94,13.57, # PANSS Cognitive
7.67, 9.62, # PANSS Positive
8.67, 11.29 # PANSS Depressive
),
sd_pre = c(12.01, 18.60, # Social Functioning (QLS) total
6.23, 3.84, # PANSS Negative
1.87, 2.02, # PANSS Excitement
4.67, 3.25, # PANSS Cognitive
2.00, 3.54, # PANSS Positive
2.47, 3.45 # PANSS Depressive
),
m_post = c(54.76, 57.70, # Social Functioning (QLS) total
16.89, 18.14, # PANSS Negative
6.89, 7.33, # PANSS Excitement
13.44, 15.19, # PANSS Cognitive
8.72, 8.72, # PANSS Positive
8.94, 13.81 # PANSS Depressive
),
sd_post = c(10.88, 15.92, # Social Functioning (QLS) total
4.51, 3.71, # PANSS Negative
2.05, 2.20, # PANSS Excitement
2.75, 2.98, # PANSS Cognitive
3.06, 2.67, # PANSS Positive
2.98, 4.21 # PANSS Depressive
)
)
# Making the lim2020 tibble wide in order to estimate the effect sizes and
# further analysis.
Lim2020_wide <-
Lim2020 |>
mutate (group = case_match(
group, "Social Cognitive Skills Training" ~ "t",
"Treatment as Usual" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
# Effect size calculating
Lim2020_est <-
Lim2020_wide |>
mutate(
study = "Lim et al. 2020",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
analysis_plan = case_when(
str_detect(outcome, "QLS") ~ "Wellbeing and Quality of Life",
str_detect(outcome, "Negative") ~ "All mental health outcomes/Symptoms of psychosis",
.default = "All mental health outcomes/Symptoms of psychosis"
),
# ppcor is imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
# F-Values - based on ANOVA - from table 2 (p.5)
#F_val = c(3.116, 5.157, 0.085, 5.055, 1.528, 8.487),
N_total = N_t + N_c,
df_ind = N_total,
# For Social functioning lower scores is beneficial why these is reverted
m_post = if_else(outcome != "Social Functioning (QLS)", (m_post_t - m_post_c)*-1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
m_diff_t = if_else(outcome != "Social Functioning (QLS)",
(m_post_t - m_pre_t) * -1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome != "Social Functioning (QLS)",
(m_post_c - m_pre_c) * -1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
icc = ICC_01,
icc_type = "Imputed",
# Average cluster size in treatment group
# We don't know the average group size. Therefore, we impute this value
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Lim2020_est
## # A tibble: 6 × 61
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Social Functioning (QLS) 18 21 21 24 46.15 61.74
## 2 PANSS Negative 18 21 21 24 18.22 16.57
## 3 PANSS Excitement 18 21 21 24 6.28 6.91
## 4 PANSS Cognitive 18 21 21 24 13.94 13.57
## 5 PANSS Positive 18 21 21 24 7.67 9.62
## 6 PANSS Depressive 18 21 21 24 8.67 11.29
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c study
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 12.01 18.6 54.76 57.7 10.88 15.92 Lim et al. 2020
## 2 6.23 3.84 16.89 18.14 4.51 3.71 Lim et al. 2020
## 3 1.87 2.02 6.89 7.33 2.05 2.2 Lim et al. 2020
## 4 4.67 3.25 13.44 15.19 2.75 2.98 Lim et al. 2020
## 5 2 3.54 8.72 8.72 3.06 2.67 Lim et al. 2020
## 6 2.47 3.45 8.94 13.81 2.98 4.21 Lim et al. 2020
## effect_size sd_used main_es_method
## <chr> <chr> <chr>
## 1 SMD Pooled posttest SD Raw diff-in-diffs
## 2 SMD Pooled posttest SD Raw diff-in-diffs
## 3 SMD Pooled posttest SD Raw diff-in-diffs
## 4 SMD Pooled posttest SD Raw diff-in-diffs
## 5 SMD Pooled posttest SD Raw diff-in-diffs
## 6 SMD Pooled posttest SD Raw diff-in-diffs
## analysis_plan ppcor ppcor_method N_total
## <chr> <dbl> <chr> <dbl>
## 1 Wellbeing and Quality of Life 0.5 Imputed 39
## 2 All mental health outcomes/Symptoms of psychosis 0.5 Imputed 39
## 3 All mental health outcomes/Symptoms of psychosis 0.5 Imputed 39
## 4 All mental health outcomes/Symptoms of psychosis 0.5 Imputed 39
## 5 All mental health outcomes/Symptoms of psychosis 0.5 Imputed 39
## 6 All mental health outcomes/Symptoms of psychosis 0.5 Imputed 39
## df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 39 -2.940 13.83 -0.2125 0.1038 0.1032 0.9806 -0.2084 0.1037 0.1032
## 2 39 1.25 4.097 0.3051 0.1044 0.1032 0.9806 0.2992 0.1043 0.1032
## 3 39 0.4400 2.132 0.2063 0.1037 0.1032 0.9806 0.2023 0.1037 0.1032
## 4 39 1.75 2.877 0.6084 0.1079 0.1032 0.9806 0.5966 0.1077 0.1032
## 5 39 0 2.856 0 0.1032 0.1032 0.9806 0 0.1032 0.1032
## 6 39 4.87 3.696 1.318 0.1254 0.1032 0.9806 1.292 0.1246 0.1032
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD icc icc_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 8.61 -4.04 0.9144 0.1139 0.1032 0.8967 0.1135 0.1032 0.1 Imputed
## 2 1.330 -1.57 0.7078 0.1096 0.1032 0.6941 0.1094 0.1032 0.1 Imputed
## 3 -0.6100 -0.42 -0.08910 0.1033 0.1032 -0.08738 0.1033 0.1032 0.1 Imputed
## 4 0.5 -1.620 0.7370 0.1101 0.1032 0.7227 0.1099 0.1032 0.1 Imputed
## 5 -1.050 0.9000 -0.6828 0.1092 0.1032 -0.6696 0.1089 0.1032 0.1 Imputed
## 6 -0.2700 -2.520 0.6088 0.1079 0.1032 0.5970 0.1077 0.1032 0.1 Imputed
## avg_cl_size avg_cl_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 8 Imputed 1 0.963 36.12 0.9791 -0.2004 0.1379
## 2 8 Imputed 1 0.963 36.12 0.9791 0.2877 0.1385
## 3 8 Imputed 1 0.963 36.12 0.9791 0.1946 0.1378
## 4 8 Imputed 1 0.963 36.12 0.9791 0.5736 0.1419
## 5 8 Imputed 1 0.963 36.12 0.9791 0 0.1373
## 6 8 Imputed 1 0.963 36.12 0.9791 1.242 0.1587
## Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1373 0.8622 0.1476 0.1373 0.3824 0.02769 36.12 36.12 1
## 2 0.1373 0.6674 0.1435 0.1373 0.2975 0.02769 36.12 36.12 1
## 3 0.1373 -0.08401 0.1374 0.1373 -0.03772 0.02769 36.12 36.12 1
## 4 0.1373 0.6949 0.1440 0.1373 0.3095 0.02769 36.12 36.12 1
## 5 0.1373 -0.6438 0.1431 0.1373 -0.2871 0.02769 36.12 36.12 1
## 6 0.1373 0.5740 0.1419 0.1373 0.2563 0.02769 36.12 36.12 1
## adj_fct_DD adj_value_DD vary_id
## <chr> <dbl> <fct>
## 1 eta 1.331 Social Functioning (QLS)
## 2 eta 1.331 PANSS Negative
## 3 eta 1.331 PANSS Excitement
## 4 eta 1.331 PANSS Cognitive
## 5 eta 1.331 PANSS Positive
## 6 eta 1.331 PANSS Depressive
From Table 2 on page 9
# Dataextraction from Lloyd-Evans (2020)
# Attempt from Jakob
# Loading the relevant package
library(estmeansd)
# From Table 2 on page 9
# Creating a tibble containing data with IQR, and later i will estimate the mean
# and SD from this information using bc.mean.sd (Box-Cox method)
lloyd_Evans2020_IQR <- tibble(
group = as.factor(rep(c("Intervention",
"Control"),
each = 1,5)),
outcome = as.factor(rep(c(
"DJG-total",
#"DJG-social", removed
#"DJG-Emotional",
"GAD-7",
"WEMWBS",
"LSNS6",
"RGUK"
#"ReQoL-10",
#"EQ-VAS",
#"days in acute", removed
#"inpatient bed days", removed
# "kept appointments"
#"missed appointments" removed
# DJG-social, days-in-acute, inpatient bed days, missed appointments: are all
# removed because there was not enough variance between the IQR to get a an estimate
# Their numbers are therefore also removed further down.
),
each = 2,1)
),
N_start = rep(c(30,10),
each = 1,5),
q1_pre = c(
10, 9, # Loneliness: De Jong-Gierveld (DJG) Loneliness Scale
# 5, 4,
# 5, 5, # DJG: Emotional Loneliness subscale score
15, 11, # Generalized Anxiety Disorder Questionnaire (GAD-7)
20, 24, # Warwick-Edinburgh Mental Well-being Scale (WEMWBS)
4, 9, # Social network: Lubben Social Network scale (LSNS6)
5, 8.8 # Perceived social capital: Resource Generator UK (RGUK)
# 4, 5, # Recovering Quality of Life Questionnaire (ReQoL-10)
# 29, 30, # Self-rated health using EQ-Visual Analogue Scale (EQ VAS)
# 0, 0,
# 0, 0,
# 3, 1 # Community service kept appointments
# 0, 0
),
median_pre = c(
11, 10.5,
# 5, 5,
# 6, 6,
19, 16,
26.5, 30,
7, 11.5,
9.5, 13
# 9, 9.5
# 35, 47.5,
# 0, 0,
# 0, 0,
# 6.5, 6.5
# 0, 0
),
q3_pre = c(
11, 11,
# 5, 5,
# 6, 6,
21, 18,
32, 34,
9, 15,
12, 18.3
# 14, 15,
# 50, 50,
# 0,0,
# 0,0,
# 11, 17
# 1, 1
),
N = rep(c(25,10), # TOT N
each = 1,5),
q1_post = c(
8, 7,
# 4, 4,
# 4, 4,
10.5, 11,
23, 23,
6, 6,
6, 6.5
# 8, 10,
# 30, 35,
# 0,0,
# 0,0,
# 2, 1
# 0,0
),
median_post = c(
9, 10,
# 5, 4,
# 5, 6,
14, 13.5,
29.5, 31,
7.5, 11,
9, 13
# 14.5, 13.5,
# 40, 52.5,
# 0,0,
# 0,0,
# 3.5, 8
# 0, 1.5
),
q3_post = c(
11, 11,
# 5, 5,
# 6, 6,
17.5, 16,
34.5, 37,
11, 15,
12.3, 22.3
# 19, 19,
# 60, 60,
# 0,0,
# 0,0,
# 10, 10
# 1, 3
)
) |>
rowwise() |>
mutate (
pre = list(bc.mean.sd(
q1.val = q1_pre,
med.val = median_pre,
q3.val = q3_pre,
n = N_start,
avoid.mc = T
)[c("est.mean", "est.sd")]),
post = list(bc.mean.sd(
q1.val = q1_post,
med.val = median_post,
q3.val = q3_post,
n = N,
avoid.mc = T
)[c("est.mean", "est.sd")])
) |>
unnest_wider(c(pre, post), names_sep = "_") |>
rename(
m_pre = pre_est.mean,
sd_pre = pre_est.sd,
m_post = post_est.mean,
sd_post = post_est.sd
) |>
suppressWarnings(); lloyd_Evans2020_IQR
## # A tibble: 10 × 14
## group outcome N_start q1_pre median_pre q3_pre N q1_post
## <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention DJG-total 30 10 11 11 25 8
## 2 Control DJG-total 10 9 10.5 11 10 7
## 3 Intervention GAD-7 30 15 19 21 25 10.5
## 4 Control GAD-7 10 11 16 18 10 11
## 5 Intervention WEMWBS 30 20 26.5 32 25 23
## 6 Control WEMWBS 10 24 30 34 10 23
## 7 Intervention LSNS6 30 4 7 9 25 6
## 8 Control LSNS6 10 9 11.5 15 10 6
## 9 Intervention RGUK 30 5 9.5 12 25 6
## 10 Control RGUK 10 8.8 13 18.3 10 6.5
## median_post q3_post m_pre sd_pre m_post sd_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 9 11 10.61 0.7817 9.566 2.433
## 2 10 11 9.927 1.743 9.140 2.137
## 3 14 17.5 17.90 3.840 14.00 5.276
## 4 13.5 16 14.76 3.499 13.50 4.261
## 5 29.5 34.5 25.58 7.999 28.29 7.396
## 6 31 37 28.59 6.434 29.57 8.435
## 7 7.5 11 6.649 2.112 8.896 4.491
## 8 11 15 12.76 5.888 10.54 4.230
## 9 9 12.3 9.008 2.519 9.349 4.670
## 10 13 22.3 14.62 8.730 16.62 13.99
# Creating a tibble with the rest of the data which is measured by mean and SD
lloyd_Evans2020_means <- tibble(
group = as.factor(rep(c("Intervention",
"Control"),
each = 1,1)),
outcome = as.factor(rep(c("PHQ-9"
# "TBD",
# "EQ-5D-5L
),
each = 2,1)
),
N_start = rep(c(30,10),
each = 1,1),
m_pre = c(
21.6, 21.1 # Depression: Patient Health Questionnaire (PHQ-9)
# 32.7, 38.4, # Activity: Time Budget Diary (TBD)
# 0.283, 0.400 # EuroQol Health Questionnaire (EQ-5D-5L) Index value
),
sd_pre = c(
5.3, 4.5
# 9.6, 11.2,
# 0.40, 0.24
),
N = rep(c(25,10), # TOT N
each = 1,1),
m_post = c(
16.4, 18.8
# 36.9, 35,
# 0.472, 0.453
),
sd_post = c(
6.8, 4.8
# 12.9, 14.4,
# 0.33, 0.236
)
); lloyd_Evans2020_means
## # A tibble: 2 × 8
## group outcome N_start m_pre sd_pre N m_post sd_post
## <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention PHQ-9 30 21.6 5.3 25 16.4 6.8
## 2 Control PHQ-9 10 21.1 4.5 10 18.8 4.8
# Combing the obejct so i have the all the data from table 2 in one obejct
lloyd_Evans2020 <- lloyd_Evans2020_IQR |>
full_join(lloyd_Evans2020_means); lloyd_Evans2020
## # A tibble: 12 × 14
## group outcome N_start q1_pre median_pre q3_pre N q1_post
## <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention DJG-total 30 10 11 11 25 8
## 2 Control DJG-total 10 9 10.5 11 10 7
## 3 Intervention GAD-7 30 15 19 21 25 10.5
## 4 Control GAD-7 10 11 16 18 10 11
## 5 Intervention WEMWBS 30 20 26.5 32 25 23
## 6 Control WEMWBS 10 24 30 34 10 23
## 7 Intervention LSNS6 30 4 7 9 25 6
## 8 Control LSNS6 10 9 11.5 15 10 6
## 9 Intervention RGUK 30 5 9.5 12 25 6
## 10 Control RGUK 10 8.8 13 18.3 10 6.5
## 11 Intervention PHQ-9 30 NA NA NA 25 NA
## 12 Control PHQ-9 10 NA NA NA 10 NA
## median_post q3_post m_pre sd_pre m_post sd_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 9 11 10.61 0.7817 9.566 2.433
## 2 10 11 9.927 1.743 9.140 2.137
## 3 14 17.5 17.90 3.840 14.00 5.276
## 4 13.5 16 14.76 3.499 13.50 4.261
## 5 29.5 34.5 25.58 7.999 28.29 7.396
## 6 31 37 28.59 6.434 29.57 8.435
## 7 7.5 11 6.649 2.112 8.896 4.491
## 8 11 15 12.76 5.888 10.54 4.230
## 9 9 12.3 9.008 2.519 9.349 4.670
## 10 13 22.3 14.62 8.730 16.62 13.99
## 11 NA NA 21.6 5.3 16.4 6.8
## 12 NA NA 21.1 4.5 18.8 4.8
# Turning dataset into wide format
lloyd_Evans2020_wide <-
lloyd_Evans2020 |>
mutate (group = case_match(
group, "Intervention" ~ "t",
"Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
)
# Effect size calculating
lloyd_Evans2020_est <-
lloyd_Evans2020_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "PHQ-9") ~ "All mental health outcomes/Depression",
str_detect(outcome, "GAD-7") ~ "All mental health outcomes/Anxiety",
str_detect(outcome, "DJG-total") ~ "Loneliness",
str_detect(outcome, "WEMWBS") ~ "Wellbeing and Quality of Life",
str_detect(outcome, "LSNS6|RGUK") ~ "Unused outcomes",
.default = NA_character_
),
study = "Lloyd Evans et al. 2020",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor is imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# Reverting m_post for specific outcomes
m_post = if_else(outcome %in% c("DJG-total", "GAD-7", "PHQ-9"),
(m_post_t - m_post_c) * -1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Reverting specific values
m_diff_t = if_else(outcome %in% c("DJG-total", "GAD-7", "PHQ-9"),
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome %in% c("DJG-total", "GAD-7", "PHQ-9"),
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD,
vary_id = outcome
) |>
rowwise() |>
mutate(
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)) |>
ungroup(); lloyd_Evans2020_est
## # A tibble: 6 × 73
## outcome N_start_t N_start_c q1_pre_t q1_pre_c median_pre_t median_pre_c
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 DJG-total 30 10 10 9 11 10.5
## 2 GAD-7 30 10 15 11 19 16
## 3 WEMWBS 30 10 20 24 26.5 30
## 4 LSNS6 30 10 4 9 7 11.5
## 5 RGUK 30 10 5 8.8 9.5 13
## 6 PHQ-9 30 10 NA NA NA NA
## q3_pre_t q3_pre_c N_t N_c q1_post_t q1_post_c median_post_t median_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11 11 25 10 8 7 9 10
## 2 21 18 25 10 10.5 11 14 13.5
## 3 32 34 25 10 23 23 29.5 31
## 4 9 15 25 10 6 6 7.5 11
## 5 12 18.3 25 10 6 6.5 9 13
## 6 NA NA 25 10 NA NA NA NA
## q3_post_t q3_post_c m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 11 11 10.61 9.927 0.7817 1.743 9.566 9.140
## 2 17.5 16 17.90 14.76 3.840 3.499 14.00 13.50
## 3 34.5 37 25.58 28.59 7.999 6.434 28.29 29.57
## 4 11 15 6.649 12.76 2.112 5.888 8.896 10.54
## 5 12.3 22.3 9.008 14.62 2.519 8.730 9.349 16.62
## 6 NA NA 21.6 21.1 5.3 4.5 16.4 18.8
## sd_post_t sd_post_c analysis_plan
## <dbl> <dbl> <chr>
## 1 2.433 2.137 Loneliness
## 2 5.276 4.261 All mental health outcomes/Anxiety
## 3 7.396 8.435 Wellbeing and Quality of Life
## 4 4.491 4.230 Unused outcomes
## 5 4.670 13.99 Unused outcomes
## 6 6.8 4.8 All mental health outcomes/Depression
## study effect_size sd_used main_es_method ppcor
## <chr> <chr> <chr> <chr> <dbl>
## 1 Lloyd Evans et al. 2020 SMD Pooled posttest SD Raw diff-in-diffs 0.5
## 2 Lloyd Evans et al. 2020 SMD Pooled posttest SD Raw diff-in-diffs 0.5
## 3 Lloyd Evans et al. 2020 SMD Pooled posttest SD Raw diff-in-diffs 0.5
## 4 Lloyd Evans et al. 2020 SMD Pooled posttest SD Raw diff-in-diffs 0.5
## 5 Lloyd Evans et al. 2020 SMD Pooled posttest SD Raw diff-in-diffs 0.5
## 6 Lloyd Evans et al. 2020 SMD Pooled posttest SD Raw diff-in-diffs 0.5
## ppcor_method N_total df_ind m_post sd_pool d_post vd_post Wd_post J
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 35 35 -0.4265 2.356 -0.1810 0.1405 0.14 0.9784
## 2 Imputed 35 35 -0.5000 5.020 -0.09961 0.1401 0.14 0.9784
## 3 Imputed 35 35 -1.285 7.693 -0.1671 0.1404 0.14 0.9784
## 4 Imputed 35 35 -1.644 4.422 -0.3718 0.1420 0.14 0.9784
## 5 Imputed 35 35 -7.273 8.320 -0.8741 0.1509 0.14 0.9784
## 6 Imputed 35 35 2.400 6.318 0.3799 0.1421 0.14 0.9784
## g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.1771 0.1404 0.14 1.042 0.7879 0.1080 0.1402 0.14 0.1056 0.1402
## 2 -0.09746 0.1401 0.14 3.902 1.257 0.5269 0.1440 0.14 0.5155 0.1438
## 3 -0.1635 0.1404 0.14 2.706 0.9768 0.2248 0.1407 0.14 0.2200 0.1407
## 4 -0.3638 0.1419 0.14 2.247 -2.222 1.011 0.1546 0.14 0.9889 0.1540
## 5 -0.8552 0.1504 0.14 0.3402 1.998 -0.1992 0.1406 0.14 -0.1949 0.1405
## 6 0.3717 0.1420 0.14 5.2 2.3 0.4590 0.1430 0.14 0.4491 0.1429
## Wg_DD vary_id avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt
## <dbl> <fct> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.14 DJG-total 8 Imputed 0.1 Imputed 1 0.975
## 2 0.14 GAD-7 8 Imputed 0.1 Imputed 1 0.975
## 3 0.14 WEMWBS 8 Imputed 0.1 Imputed 1 0.975
## 4 0.14 LSNS6 8 Imputed 0.1 Imputed 1 0.975
## 5 0.14 RGUK 8 Imputed 0.1 Imputed 1 0.975
## 6 0.14 PHQ-9 8 Imputed 0.1 Imputed 1 0.975
## df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 31.65 0.9761 -0.1723 0.1585 0.1581 0.1028 0.1582 0.1581 0.04593
## 2 31.65 0.9761 -0.09480 0.1582 0.1581 0.5015 0.1620 0.1581 0.2233
## 3 31.65 0.9761 -0.1590 0.1585 0.1581 0.2140 0.1588 0.1581 0.09559
## 4 31.65 0.9761 -0.3538 0.1600 0.1581 0.9619 0.1727 0.1581 0.4237
## 5 31.65 0.9761 -0.8319 0.1690 0.1581 -0.1896 0.1586 0.1581 -0.08473
## 6 31.65 0.9761 0.3615 0.1601 0.1581 0.4369 0.1611 0.1581 0.1947
## vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.03160 31.65 31.65 1 eta 1.129
## 2 0.03160 31.65 31.65 1 eta 1.129
## 3 0.03160 31.65 31.65 1 eta 1.129
## 4 0.03160 31.65 31.65 1 eta 1.129
## 5 0.03160 31.65 31.65 1 eta 1.129
## 6 0.03160 31.65 31.65 1 eta 1.129
We extracted data from Table 2 (p. 141)
# Table 2, p. 141
Madigan2013 <- tibble(
group = rep(c("GPI",
"TAU"),
each = 1,12),
outcome = rep(c("ASI",
# "BIS",
# "Attitude to treatment",
"Positive symptoms",
"Negative symptoms",
"Depressive symptoms",
"Global functioning (GAF)",
"WHOQOL"),
each = 2,2),
timing = rep(c("3m", "12m"), each = 12),
N = c(
# 3 months
36, 18,
# 39, 19,
# 33, 15,
42, 22,
40, 20,
40, 20,
39, 19,
34, 15,
# 12 months
28, 14,
# 32, 14,
# 30, 12,
32, 17,
32, 19,
33, 11,
31, 16,
34, 14),
N_start = rep(c(
59, 29,
# 47, 19,
# 39, 17,
59, 28,
59, 28,
59, 28,
58, 29,
39, 14
), each = 1, 2),
m_pre = rep(c(
10., 10.1,
# 6.8, 6.3,
# 5.8, 5.8,
5.4, 5.7,
7.7, 7.4,
5.1, 5.,
38.3, 38.,
12.5, 13.3),
each = 1,2),
sd_pre = rep(c(
3.6, 3.7,
# 2.8, 2.7,
# 9.6, 9.7,
4., 4.8,
3.1, 3.,
5.7, 6.4,
13.1, 9.,
4., 2.8),
each = 1,2),
m_post = c(
# 3 months
9.9, 10.1,
# 7.7, 6.6,
# 8.1, 5.9,
4.8, 5.1,
3.8, 3.2,
4.4, 4.6,
37.4, 36.6,
13.5, 12.6,
#12 months
9.8, 10.1,
# 7., 6.6,
# 7., 6.5,
4.9, 5.1,
4.6, 4.8,
4.3, 4.3,
37.6, 37.2,
12.6, 11.1
),
sd_post = c(
# 3 months
4., 4.2,
# 2.2, 2.4,
# 9.9, 9.6,
3.7, 4.1,
2.4, 2.3,
4.3, 4.8,
8., 9.6,
3.3, 3.4,
#12 months
3.9, 4.,
# 2.9, 1.5,
# 9.5, 9.3,
4., 4.2,
3., 3.2,
4.4, 4.2,
8.34, 11.5,
3.4, 2.9)
); Madigan2013
## # A tibble: 24 × 9
## group outcome timing N N_start m_pre sd_pre m_post
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 GPI ASI 3m 36 59 10 3.6 9.9
## 2 TAU ASI 3m 18 29 10.1 3.7 10.1
## 3 GPI Positive symptoms 3m 42 59 5.4 4 4.8
## 4 TAU Positive symptoms 3m 22 28 5.7 4.8 5.1
## 5 GPI Negative symptoms 3m 40 59 7.7 3.1 3.8
## 6 TAU Negative symptoms 3m 20 28 7.4 3 3.2
## 7 GPI Depressive symptoms 3m 40 59 5.1 5.7 4.4
## 8 TAU Depressive symptoms 3m 20 28 5 6.4 4.6
## 9 GPI Global functioning (GAF) 3m 39 58 38.3 13.1 37.4
## 10 TAU Global functioning (GAF) 3m 19 29 38 9 36.6
## 11 GPI WHOQOL 3m 34 39 12.5 4 13.5
## 12 TAU WHOQOL 3m 15 14 13.3 2.8 12.6
## 13 GPI ASI 12m 28 59 10 3.6 9.8
## 14 TAU ASI 12m 14 29 10.1 3.7 10.1
## 15 GPI Positive symptoms 12m 32 59 5.4 4 4.9
## 16 TAU Positive symptoms 12m 17 28 5.7 4.8 5.1
## 17 GPI Negative symptoms 12m 32 59 7.7 3.1 4.6
## 18 TAU Negative symptoms 12m 19 28 7.4 3 4.8
## 19 GPI Depressive symptoms 12m 33 59 5.1 5.7 4.3
## 20 TAU Depressive symptoms 12m 11 28 5 6.4 4.3
## 21 GPI Global functioning (GAF) 12m 31 58 38.3 13.1 37.6
## 22 TAU Global functioning (GAF) 12m 16 29 38 9 37.2
## 23 GPI WHOQOL 12m 34 39 12.5 4 12.6
## 24 TAU WHOQOL 12m 14 14 13.3 2.8 11.1
## sd_post
## <dbl>
## 1 4
## 2 4.2
## 3 3.7
## 4 4.1
## 5 2.4
## 6 2.3
## 7 4.3
## 8 4.8
## 9 8
## 10 9.6
## 11 3.3
## 12 3.4
## 13 3.9
## 14 4
## 15 4
## 16 4.2
## 17 3
## 18 3.2
## 19 4.4
## 20 4.2
## 21 8.34
## 22 11.5
## 23 3.4
## 24 2.9
# Turning data into wide format
Madigan2013_wide <- Madigan2013 |>
mutate(group = case_match(group, "GPI" ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col())
# Multi level effect estimates can be obtained from table 3, p. 3
Madigan2013_est <-
Madigan2013_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "ASI") ~ "Alcohol and drug abuse/misuse",
str_detect(outcome, "Depressive symptoms") ~ "All mental health outcomes/Depression",
str_detect(outcome, "Positive") ~ "All mental health outcomes",
str_detect(outcome, "Negative") ~ "All mental health outcomes/Negative symptoms",
str_detect(outcome, "Global") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "WHOQOL") ~ "Wellbeing and Quality of Life",
.default = NA_character_
),
study = c("Madigan et al. 2013"),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# Reverting m_post for specific outcomes
m_post = if_else(outcome %in% c("ASI",
"Positive symptoms",
"Negative symptoms",
"Depressive symptoms"),
(m_post_t - m_post_c) * -1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Reverting specific values
m_diff_t = if_else(outcome %in% c("ASI",
"Positive symptoms",
"Negative symptoms",
"Depressive symptoms"),
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome %in% c("ASI",
"Positive symptoms",
"Negative symptoms",
"Depressive symptoms"),
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
gt_DD_pop = if_else(
str_detect(outcome, "GAF"),
omega * ((m_diff_t - m_diff_c)/GAF_pop_res$sd_population_GAF) * gamma_sqrt,
NA_real_
),
# Calculated from Eq. 28 (Fitzgerald & Tipton, 2024)
vgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD) + g_DD^2/(2*GAF_pop_res$df_pop),
NA_real_
),
Wgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD),
NA_real_
),
vary_id = paste0(outcome, "/", timing)
) |>
ungroup(); Madigan2013_est
## # A tibble: 12 × 65
## outcome timing N_t N_c N_start_t N_start_c m_pre_t
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 ASI 3m 36 18 59 29 10
## 2 Positive symptoms 3m 42 22 59 28 5.4
## 3 Negative symptoms 3m 40 20 59 28 7.7
## 4 Depressive symptoms 3m 40 20 59 28 5.1
## 5 Global functioning (GAF) 3m 39 19 58 29 38.3
## 6 WHOQOL 3m 34 15 39 14 12.5
## 7 ASI 12m 28 14 59 29 10
## 8 Positive symptoms 12m 32 17 59 28 5.4
## 9 Negative symptoms 12m 32 19 59 28 7.7
## 10 Depressive symptoms 12m 33 11 59 28 5.1
## 11 Global functioning (GAF) 12m 31 16 58 29 38.3
## 12 WHOQOL 12m 34 14 39 14 12.5
## m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 10.1 3.6 3.7 9.9 10.1 4 4.2
## 2 5.7 4 4.8 4.8 5.1 3.7 4.1
## 3 7.4 3.1 3 3.8 3.2 2.4 2.3
## 4 5 5.7 6.4 4.4 4.6 4.3 4.8
## 5 38 13.1 9 37.4 36.6 8 9.6
## 6 13.3 4 2.8 13.5 12.6 3.3 3.4
## 7 10.1 3.6 3.7 9.8 10.1 3.9 4
## 8 5.7 4 4.8 4.9 5.1 4 4.2
## 9 7.4 3.1 3 4.6 4.8 3 3.2
## 10 5 5.7 6.4 4.3 4.3 4.4 4.2
## 11 38 13.1 9 37.6 37.2 8.34 11.5
## 12 13.3 4 2.8 12.6 11.1 3.4 2.9
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 Alcohol and drug abuse/misuse Madigan et al. 2013 SMD
## 2 All mental health outcomes Madigan et al. 2013 SMD
## 3 All mental health outcomes/Negative symptoms Madigan et al. 2013 SMD
## 4 All mental health outcomes/Depression Madigan et al. 2013 SMD
## 5 Social functioning (degree of impairment) Madigan et al. 2013 SMD
## 6 Wellbeing and Quality of Life Madigan et al. 2013 SMD
## 7 Alcohol and drug abuse/misuse Madigan et al. 2013 SMD
## 8 All mental health outcomes Madigan et al. 2013 SMD
## 9 All mental health outcomes/Negative symptoms Madigan et al. 2013 SMD
## 10 All mental health outcomes/Depression Madigan et al. 2013 SMD
## 11 Social functioning (degree of impairment) Madigan et al. 2013 SMD
## 12 Wellbeing and Quality of Life Madigan et al. 2013 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind
## <chr> <chr> <dbl> <chr> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 54 54
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 64 64
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 60 60
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 60 60
## 5 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 58 58
## 6 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 49 49
## 7 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 42 42
## 8 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 49 49
## 9 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 51 51
## 10 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 44 44
## 11 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 47 47
## 12 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 48 48
## m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.2000 4.066 0.04918 0.08336 0.08333 0.9860 0.04850 0.08336 0.08333
## 2 0.3000 3.840 0.07812 0.06931 0.06926 0.9882 0.07720 0.06931 0.06926
## 3 -0.6000 2.368 -0.2534 0.07554 0.075 0.9874 -0.2502 0.07552 0.075
## 4 0.2000 4.470 0.04474 0.07502 0.075 0.9874 0.04418 0.07502 0.075
## 5 0.8000 8.547 0.09360 0.07835 0.07827 0.9870 0.09238 0.07835 0.07827
## 6 0.9 3.330 0.2703 0.09682 0.09608 0.9846 0.2661 0.09680 0.09608
## 7 0.3000 3.933 0.07628 0.1072 0.1071 0.9820 0.07491 0.1072 0.1071
## 8 0.2000 4.069 0.04915 0.09010 0.09007 0.9846 0.04839 0.09010 0.09007
## 9 0.2000 3.075 0.06504 0.08392 0.08388 0.9852 0.06408 0.08392 0.08388
## 10 0 4.353 0 0.1212 0.1212 0.9829 0 0.1212 0.1212
## 11 0.4000 9.511 0.04206 0.09478 0.09476 0.9840 0.04138 0.09478 0.09476
## 12 1.5 3.266 0.4592 0.1030 0.1008 0.9843 0.4520 0.1030 0.1008
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1000 0 0.02459 0.08334 0.08333 0.02425 0.08334 0.08333
## 2 0.6000 0.6000 0 0.06926 0.06926 0 0.06926 0.06926
## 3 3.9 4.2 -0.1267 0.07513 0.075 -0.1251 0.07513 0.075
## 4 0.7000 0.4000 0.06711 0.07504 0.075 0.06627 0.07504 0.075
## 5 -0.9000 -1.400 0.05850 0.07830 0.07827 0.05774 0.07830 0.07827
## 6 1 -0.7000 0.5105 0.09874 0.09608 0.5026 0.09866 0.09608
## 7 0.2000 0 0.05085 0.1072 0.1071 0.04994 0.1072 0.1071
## 8 0.5 0.6000 -0.02457 0.09008 0.09007 -0.02420 0.09008 0.09007
## 9 3.1 2.6 0.1626 0.08414 0.08388 0.1602 0.08413 0.08388
## 10 0.8 0.7 0.02297 0.1212 0.1212 0.02258 0.1212 0.1212
## 11 -0.7000 -0.8000 0.01051 0.09476 0.09476 0.01035 0.09476 0.09476
## 12 0.1000 -2.20 0.7041 0.1060 0.1008 0.6931 0.1058 0.1008
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 8 Imputed 0.1 Imputed 1 0.977 49.8 0.9849
## 2 8 Imputed 0.1 Imputed 1 0.977 59.34 0.9873
## 3 8 Imputed 0.1 Imputed 1 0.977 55.5 0.9864
## 4 8 Imputed 0.1 Imputed 1 0.977 55.5 0.9864
## 5 8 Imputed 0.1 Imputed 1 0.977 53.58 0.9859
## 6 8 Imputed 0.1 Imputed 1 0.977 44.97 0.9832
## 7 8 Imputed 0.1 Imputed 1 0.975 38.4 0.9803
## 8 8 Imputed 0.1 Imputed 1 0.975 45.09 0.9833
## 9 8 Imputed 0.1 Imputed 1 0.974 47.08 0.9840
## 10 8 Imputed 0.1 Imputed 1 0.98 40.08 0.9812
## 11 8 Imputed 0.1 Imputed 1 0.975 43.17 0.9825
## 12 8 Imputed 0.1 Imputed 1 0.978 43.98 0.9828
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.04732 0.09727 0.09725 0.02366 0.09726 0.09725 0.01075 0.02008 49.8
## 2 0.07536 0.08143 0.08139 0 0.08139 0.08139 0 0.01685 59.34
## 3 -0.2442 0.08806 0.08753 -0.1221 0.08766 0.08753 -0.05539 0.01802 55.5
## 4 0.04312 0.08754 0.08753 0.06468 0.08756 0.08753 0.02934 0.01802 55.5
## 5 0.09016 0.09103 0.09095 0.05635 0.09098 0.09095 0.02553 0.01866 53.58
## 6 0.2596 0.1108 0.1100 0.4904 0.1127 0.1100 0.2196 0.02224 44.97
## 7 0.07291 0.1251 0.1250 0.04861 0.1251 0.1250 0.02218 0.02604 38.4
## 8 0.04712 0.1061 0.1061 -0.02356 0.1061 0.1061 -0.01077 0.02218 45.09
## 9 0.06234 0.1005 0.1005 0.1558 0.1007 0.1005 0.07162 0.02124 47.08
## 10 0 0.1333 0.1333 0.02209 0.1333 0.1333 0.009555 0.02495 40.08
## 11 0.04029 0.1111 0.1111 0.01007 0.1111 0.1111 0.004600 0.02316 43.17
## 12 0.4414 0.1165 0.1143 0.6768 0.1195 0.1143 0.2997 0.02274 43.98
## df_DD n_covariates_DD adj_fct_DD adj_value_DD gt_DD_pop vgt_DD_pop Wgt_DD_pop
## <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 49.8 1 eta 1.167 NA NA NA
## 2 59.34 1 eta 1.175 NA NA NA
## 3 55.5 1 eta 1.167 NA NA NA
## 4 55.5 1 eta 1.167 NA NA NA
## 5 53.58 1 eta 1.162 0.03802 0.08790 0.08789
## 6 44.97 1 eta 1.145 NA NA NA
## 7 38.4 1 eta 1.167 NA NA NA
## 8 45.09 1 eta 1.178 NA NA NA
## 9 47.08 1 eta 1.198 NA NA NA
## 10 40.08 1 eta 1.1 NA NA NA
## 11 43.17 1 eta 1.172 0.007563 0.1073 0.1073
## 12 43.98 1 eta 1.133 NA NA NA
## vary_id
## <chr>
## 1 ASI/3m
## 2 Positive symptoms/3m
## 3 Negative symptoms/3m
## 4 Depressive symptoms/3m
## 5 Global functioning (GAF)/3m
## 6 WHOQOL/3m
## 7 ASI/12m
## 8 Positive symptoms/12m
## 9 Negative symptoms/12m
## 10 Depressive symptoms/12m
## 11 Global functioning (GAF)/12m
## 12 WHOQOL/12m
McCay2006_est <-
tibble(
study = "McCay 2006",
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diff",
outcome = c("MES", "QLS total", "PANSS Negative", "PANSS total"),
analysis_plan = c(
"Self-esteem", "Wellbeing and Quality of Life",
"All mental health outcomes/Negative symptoms", "All mental health outcomes/Symptoms of psychosis"
),
N_t = 26,
N_c = 14,
N_total = N_t + N_c,
df_ind = N_total,
N_start_t = N_t,
N_start_c = N_c,
n_covariates = 1,
m_pre_t = c(78.2, 77.2, 11.7, 26.5),
sd_pre_t = c(19.8, 14.5, 3.7, 5.3),
m_post_t = c(67.9, 82.5, 10.6, 22.2),
sd_post_t = c(18.9, 11.6, 3.5, 3.5),
tval_paired_t = c(3.6, -2, 1.6, 4),
r_t =((sd_pre_t^2*tval_paired_t^2 + sd_post_t^2*tval_paired_t^2) -
(m_post_t-m_pre_t)^2 * N_t)/ (2 * sd_pre_t*sd_post_t*tval_paired_t^2),
z_t = 0.5 * log( (1+r_t)/(1-r_t) ),
v_t = 1/(N_t-3),
w_t = 1/v_t,
m_pre_c = c(69.6, 82.2, 10.6, 24.9),
sd_pre_c = c(18.9, 13.4, 2.7, 5.3),
m_post_c = c(69.7, 85.9, 10.1, 23.6),
sd_post_c = c(19.2, 12.1, 3, 6),
tval_paired_c = c(-0.01, -1.5, 0.75, 0.89),
r_c =((sd_pre_c^2*tval_paired_c^2 + sd_post_c^2*tval_paired_c^2) -
(m_post_c-m_pre_c)^2 * N_c)/ (2 * sd_pre_c*sd_post_c*tval_paired_c^2)
) |>
mutate(
r_c = if_else(r_c < 0, abs(r_c), r_c),
z_c = 0.5 * log( (1+r_c)/(1-r_c) ),
v_c = 1/(N_c-3),
w_c = 1/v_c,
mean_z = (w_t*z_t + w_c*z_c)/(w_t + w_c),
ppcor = (exp(2*mean_z)-1)/(exp(2*mean_z)+1),
ppcor_method = "Calculated from study results",
# Lower scores on the Modified Engulfment Scale and Positive and Negative Symptoms Scale
#indicate less engulfment and fewer symptoms respectively; higher scores on the Quality of
# Life Scale indicate improved adjustment
m_post = if_else(str_detect(outcome, "QLS"), (m_post_t - m_post_c), (m_post_t - m_post_c)*-1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For YMRS and HAM-D lower scores are beneficial why these are reverted
m_diff_t = if_else(str_detect(outcome, "QLS"), (m_post_t - m_pre_t), (m_post_t - m_pre_t)*-1),
m_diff_c = if_else(str_detect(outcome, "QLS"), (m_post_c - m_pre_c), (m_post_c - m_pre_c)*-1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
#
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); McCay2006_est
## # A tibble: 4 × 72
## study effect_size sd_used main_es_method outcome
## <chr> <chr> <chr> <chr> <chr>
## 1 McCay 2006 SMD Pooled posttest SDs Raw diff-in-diff MES
## 2 McCay 2006 SMD Pooled posttest SDs Raw diff-in-diff QLS total
## 3 McCay 2006 SMD Pooled posttest SDs Raw diff-in-diff PANSS Negative
## 4 McCay 2006 SMD Pooled posttest SDs Raw diff-in-diff PANSS total
## analysis_plan N_t N_c N_total df_ind
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Self-esteem 26 14 40 40
## 2 Wellbeing and Quality of Life 26 14 40 40
## 3 All mental health outcomes/Negative symptoms 26 14 40 40
## 4 All mental health outcomes/Symptoms of psychosis 26 14 40 40
## N_start_t N_start_c n_covariates m_pre_t sd_pre_t m_post_t sd_post_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 26 14 1 78.2 19.8 67.9 18.9
## 2 26 14 1 77.2 14.5 82.5 11.6
## 3 26 14 1 11.7 3.7 10.6 3.5
## 4 26 14 1 26.5 5.3 22.2 3.5
## tval_paired_t r_t z_t v_t w_t m_pre_c sd_pre_c m_post_c sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3.6 0.7167 0.9008 0.04348 23 69.6 18.9 69.7 19.2
## 2 -2 0.4822 0.5259 0.04348 23 82.2 13.4 85.9 12.1
## 3 1.6 0.5271 0.5861 0.04348 23 10.6 2.7 10.1 3
## 4 4 0.2775 0.2849 0.04348 23 24.9 5.3 23.6 6
## tval_paired_c r_c z_c v_c w_c mean_z ppcor
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.01 0.9289 1.650 0.09091 11 1.143 0.8155
## 2 -1.5 0.7425 0.9561 0.09091 11 0.6651 0.5817
## 3 0.75 0.6215 0.7274 0.09091 11 0.6318 0.5593
## 4 0.89 0.5381 0.6014 0.09091 11 0.3873 0.3690
## ppcor_method m_post sd_pool d_post vd_post Wd_post J
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Calculated from study results 1.800 19.00 0.09472 0.1100 0.1099 0.9811
## 2 Calculated from study results -3.400 11.77 -0.2888 0.1109 0.1099 0.9811
## 3 Calculated from study results -0.5 3.337 -0.1498 0.1102 0.1099 0.9811
## 4 Calculated from study results 1.400 4.514 0.3102 0.1111 0.1099 0.9811
## g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.09293 0.1100 0.1099 10.3 -0.1000 0.5473 0.04429 0.04055 0.5370
## 2 -0.2833 0.1109 0.1099 5.3 3.700 0.1359 0.09216 0.09193 0.1333
## 3 -0.1470 0.1102 0.1099 1.1 0.5 0.1798 0.09726 0.09686 0.1764
## 4 0.3043 0.1110 0.1099 4.3 1.300 0.6646 0.1442 0.1387 0.6521
## vg_DD Wg_DD avg_cl_size avg_cl_type icc icc_type gamma_sqrt df_adj
## <dbl> <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.04415 0.04055 8 Imputed 0.1 Imputed 0.973 36.55
## 2 0.09215 0.09193 8 Imputed 0.1 Imputed 0.973 36.55
## 3 0.09725 0.09686 8 Imputed 0.1 Imputed 0.973 36.55
## 4 0.1440 0.1387 8 Imputed 0.1 Imputed 0.973 36.55
## omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9793 0.09026 0.1298 0.1297 0.5215 0.05156 0.04784 0.3894 0.02736 36.55
## 2 0.9793 -0.2752 0.1307 0.1297 0.1295 0.1087 0.1085 0.06501 0.02736 36.55
## 3 0.9793 -0.1428 0.1299 0.1297 0.1713 0.1147 0.1143 0.08377 0.02736 36.55
## 4 0.9793 0.2955 0.1309 0.1297 0.6333 0.1691 0.1636 0.2575 0.02736 36.55
## df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <chr> <dbl> <chr>
## 1 36.55 1 eta 1.18 MES
## 2 36.55 1 eta 1.18 QLS total
## 3 36.55 1 eta 1.18 PANSS Negative
## 4 36.55 1 eta 1.18 PANSS total
Results are extracted from Table 3 (p. 6) and Table 4 (p. 7). Sample size data is retrieved from Table 1 (p. 6)
McCay2014_est <-
tibble(
study = "McCay 2007/2014",
effect_size = "SMD",
sd_used = "Unknown - d was calculated from ANOVA F-val",
outcome = c("MES", "QLS", "MHS"),
N_t = 29,
N_c = 18,
N_total = N_t + N_c,
N_start_t = 41, # See text on page 3
N_start_c = 26,
df_ind = N_total,
n_covariates = 1,
m_pre_t = c(85.99, 61.90, 137.05),
sd_pre_t = c(19.38, 17.08, 28.83),
m_post_t = c(77.64, 72.76, 143.52),
sd_post_t = c(20.28, 15.03, 26.17),
tval_paired_t = c(4.12, -6.59, -2.13),
ppcor = ((sd_pre_t^2*tval_paired_t ^2 + sd_post_t^2*tval_paired_t^2) -
(m_post_t-m_pre_t)^2 * N_t)/ (2 * sd_pre_t*sd_post_t*tval_paired_t^2),
ppcor_method = "Calcualted from treatment group scores only",
F_val = c(6.5, 11.67, 6.15),
main_es_method = "Repeated ANOVA (group x time)",
analysis_plan = c(
"Self-esteem", "Wellbeing and Quality of Life",
"Hope, Empowerment & Self-efficacy"
),
d_adj = sqrt((F_val * N_total)/(N_t*N_c)) * sqrt(1-ppcor^2),
vd_adj = (1/N_t + 1/N_c) * (1-ppcor^2) + d_adj^2/(2*N_total),
Wd_adj = (1/N_t + 1/N_c) * (1-ppcor^2),
J = 1 - 3/(4*df_ind-1),
g_adj = J * d_adj,
vg_adj = (1/N_t + 1/N_c) * (1-ppcor^2) + g_adj^2/(2*N_total),
Wg_adj = (1/N_t + 1/N_c) * (1-ppcor^2)
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# "was 7.0±2.1 (range of three to 12)" (p. 57)
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_adj = omega * d_adj * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_adj,
model = "ANCOVA",
cluster_adj = FALSE,
R2 = ppcor,
add_name_to_vars = "_adj",
vars = -var_term1_adj
),
vary_id = outcome
) |>
ungroup(); McCay2014_est
## # A tibble: 3 × 45
## study effect_size sd_used
## <chr> <chr> <chr>
## 1 McCay 2007/2014 SMD Unknown - d was calculated from ANOVA F-val
## 2 McCay 2007/2014 SMD Unknown - d was calculated from ANOVA F-val
## 3 McCay 2007/2014 SMD Unknown - d was calculated from ANOVA F-val
## outcome N_t N_c N_total N_start_t N_start_c df_ind n_covariates m_pre_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 MES 29 18 47 41 26 47 1 85.99
## 2 QLS 29 18 47 41 26 47 1 61.9
## 3 MHS 29 18 47 41 26 47 1 137.0
## sd_pre_t m_post_t sd_post_t tval_paired_t ppcor
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 19.38 77.64 20.28 4.12 0.8495
## 2 17.08 72.76 15.03 -6.59 0.8548
## 3 28.83 143.5 26.17 -2.13 0.8274
## ppcor_method F_val
## <chr> <dbl>
## 1 Calcualted from treatment group scores only 6.5
## 2 Calcualted from treatment group scores only 11.67
## 3 Calcualted from treatment group scores only 6.15
## main_es_method analysis_plan d_adj vd_adj
## <chr> <chr> <dbl> <dbl>
## 1 Repeated ANOVA (group x time) Self-esteem 0.4036 0.02680
## 2 Repeated ANOVA (group x time) Wellbeing and Quality of Life 0.5320 0.02726
## 3 Repeated ANOVA (group x time) Hope, Empowerment & Self-efficacy 0.4180 0.03026
## Wd_adj J g_adj vg_adj Wg_adj avg_cl_size avg_cl_type icc icc_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 0.02506 0.9840 0.3971 0.02674 0.02506 8 Imputed 0.1 Imputed
## 2 0.02425 0.9840 0.5234 0.02717 0.02425 8 Imputed 0.1 Imputed
## 3 0.02840 0.9840 0.4112 0.03020 0.02840 8 Imputed 0.1 Imputed
## gamma_sqrt df_adj omega gt_adj vgt_adj Wgt_adj hg_adj vhg_adj h_adj
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.973 43.3 0.9826 0.3859 0.01806 0.01634 0.4510 0.02309 43.3
## 2 0.973 43.3 0.9826 0.5086 0.01875 0.01577 0.5976 0.02309 43.3
## 3 0.973 43.3 0.9826 0.3996 0.02059 0.01875 0.4366 0.02309 43.3
## n_covariates_adj adj_fct_adj adj_value_adj vary_id
## <dbl> <chr> <dbl> <chr>
## 1 1 eta 1.206 MES
## 2 1 eta 1.206 QLS
## 3 1 eta 1.206 MHS
Michalak_2015 <- tibble(
outcome = rep(c(
"HAM-D", # Hamilton Depression Rating Scale
"BDI" # BDI
), each = 3),
group = rep(c(
"MBCT", # mindfulness-based cognitive therapy
"CBASP", # cognitive behavioral analysis system of psychotherapy
"TAU" # Treatment as usual (control group)
), times = 2),
N = rep(c(36, 35, 35), times = 2),
N_start = N,
m_pre = c(
23.03, 24.71, 23.87, # Hamilton Depression Rating Scale
31.31, 30.26, 29.76 # BDI
),
sd_pre = c(
6.27, 6.69, 6.33,
9.55, 7.52, 7.42
),
m_post = c(
17.86, 14.64, 21.16, # Hamilton Depression Rating Scale
22.69, 22.28, 28.34 # BDI
),
sd_post = c(
10.37, 8.85, 8.16,
12.11, 12.54, 10.27
)
)
Michalak2015_wide_DD <-
map(c("MBCT", "CBASP"), \(x)
Michalak_2015 |>
filter(group %in% c(x, "TAU")) |>
mutate(group = case_match(group, x ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
mutate(
treatment = x,
N_total = N_t + N_c
) |>
relocate(treatment)
) |>
list_rbind() |>
mutate(
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
analysis_plan = "All mental health outcomes/Depression"
)
Michalak2015_wide_from_paper <-
tibble(
effect_size = "SMD",
sd_used = "Unknown - extracted from report effect sizes",
main_es_method = "Covariate-adjusted es from multi-level regression",
analysis_plan = rep(c(
"Wellbeing and Quality of Life",
"Social functioning (degree of impairment)"
), c(8,2)),
outcome = paste0(
rep(c("SF-36", "SASS"), c(8,2)), "/",
rep(c("Vitality", "Social func", "Role", "Mental health", "overall"), each = 2)
),
treatment = rep(c("MBCT","CBASP"), each = 1,5),
N_t = rep(c(36,35), each = 1,5),
N_c = 35,
N_total = N_t + N_c,
N_start_t = N_t,
N_start_c = N_c,
b_reg = c(1.12, 1.32,
0.27, 0.74,
0.52, 0.46,
0.63, 1.25,
2.43, 1.68),
se_b_reg = c(0.90, 0.70,
0.43, 0.44,
0.26, 0.24,
0.95, 0.89,
1.01, 0.93),
t_val = b_reg/se_b_reg,
es_paper = c(0.31,0.36,
0.12, 0.34,
0.48, 0.42,
0.14, 0.28,
0.57, 0.40),
es_paper_type = "Covariate-adjusted ES (d) from a multi-level model",
sd_total = b_reg/es_paper
)
Michalak_2015_dat <-
bind_rows(Michalak2015_wide_DD, Michalak2015_wide_from_paper)
ppcor <- ppcor_imp <- 0.5
Michalak_2015_est <-
Michalak_2015_dat |>
mutate(
study = "Michalak et al. 2015",
vary_id = paste0(outcome, "/", treatment),
ppcor = ppcor_imp,
ppcor_method = "Imputed",
df_ind = N_total,
m_post = if_else(is.na(es_paper), (m_post_t - m_post_c)*-1, NA_real_),
sd_pool = if_else(
is.na(es_paper),
sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
sqrt( ((N_total-1)/(N_total-2))*sd_total^2 - ((N_t*N_c)/(N_total * (N_total-2)))*b_reg^2 )
),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = if_else(is.na(es_paper), (1/N_t + 1/N_c), NA_real_),
J = 1 - 3/(4*df_ind-1),
g_post = J * (m_post/sd_pool),
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# DiD (DD) effect sizes for HAM-D og BDI
#cluster bias adjustment
# For HAM-D lower scores is beneficial, hence these are reverted
m_diff_t = if_else(
str_detect(outcome, "HAM|BDI"),
(m_post_t - m_pre_t) * -1,
m_post_t - m_pre_t
),
m_diff_c = if_else(
str_detect(outcome, "HAM|BDI"),
(m_post_c - m_pre_c) * -1,
m_post_c - m_pre_c
),
d_DD = (m_diff_t - m_diff_c) / sd_pool,
vd_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c) + d_DD^2 / (2 * df_ind),
Wd_DD = if_else(is.na(es_paper), 2 * (1 - ppcor) * (1 / N_t + 1 / N_c), NA_real_),
g_DD = J * d_DD,
vg_DD = 2 * (1 - ppcor) * (1 / N_t + 1 / N_c) + g_DD^2 / (2 * df_ind),
Wg_DD = Wd_DD,
# Reg adjusted effect sizes for SF-36 and SASS outcomes
d_reg = b_reg/sd_pool,
vd_reg = d_reg^2 * (1/t_val^2 + 1/(2*df_ind)),
Wd_reg = d_reg^2 * (1/t_val^2),
g_reg = J * d_reg,
vg_reg = g_reg^2 * (1/t_val^2 + 1/(2*df_ind)),
Wg_reg = Wd_reg
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
avg_cl_size = 6,
avg_cl_type = "From study (p. 177)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,# Baseline scores only
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3 / (4 * df_adj - 1),
# Cluster-adjusting g_post
gt_post = if_else(is.na(es_paper), omega * d_post * gamma_sqrt, NA_real_),
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c("vgt_post", "Wgt_post")
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -c("var_term1_DD")
),
gt_reg = omega * d_reg * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_reg,
model = "reg_coef",
cluster_adj = TRUE,
t_val = t_val,
q = n_covariates,
add_name_to_vars = "_reg",
vars = -c("var_term1_reg")
),
across(c(Wgt_post, Wgt_DD:adj_value_DD), ~ if_else(!str_detect(outcome, "HAM|BDI"), NA, .x)),
across(c(Wgt_reg:adj_value_reg), ~ if_else(str_detect(outcome, "HAM|BDI"), NA, .x))
) |>
ungroup(); Michalak_2015_est
## # A tibble: 14 × 84
## treatment outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 MBCT HAM-D 36 35 36 35 23.03 23.87
## 2 MBCT BDI 36 35 36 35 31.31 29.76
## 3 CBASP HAM-D 35 35 35 35 24.71 23.87
## 4 CBASP BDI 35 35 35 35 30.26 29.76
## 5 MBCT SF-36/Vitality 36 35 36 35 NA NA
## 6 CBASP SF-36/Vitality 35 35 35 35 NA NA
## 7 MBCT SF-36/Social func 36 35 36 35 NA NA
## 8 CBASP SF-36/Social func 35 35 35 35 NA NA
## 9 MBCT SF-36/Role 36 35 36 35 NA NA
## 10 CBASP SF-36/Role 35 35 35 35 NA NA
## 11 MBCT SF-36/Mental health 36 35 36 35 NA NA
## 12 CBASP SF-36/Mental health 35 35 35 35 NA NA
## 13 MBCT SASS/overall 36 35 36 35 NA NA
## 14 CBASP SASS/overall 35 35 35 35 NA NA
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c N_total effect_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 6.27 6.33 17.86 21.16 10.37 8.16 71 SMD
## 2 9.55 7.42 22.69 28.34 12.11 10.27 71 SMD
## 3 6.69 6.33 14.64 21.16 8.85 8.16 70 SMD
## 4 7.52 7.42 22.28 28.34 12.54 10.27 70 SMD
## 5 NA NA NA NA NA NA 71 SMD
## 6 NA NA NA NA NA NA 70 SMD
## 7 NA NA NA NA NA NA 71 SMD
## 8 NA NA NA NA NA NA 70 SMD
## 9 NA NA NA NA NA NA 71 SMD
## 10 NA NA NA NA NA NA 70 SMD
## 11 NA NA NA NA NA NA 71 SMD
## 12 NA NA NA NA NA NA 70 SMD
## 13 NA NA NA NA NA NA 71 SMD
## 14 NA NA NA NA NA NA 70 SMD
## sd_used
## <chr>
## 1 Pooled posttest SD
## 2 Pooled posttest SD
## 3 Pooled posttest SD
## 4 Pooled posttest SD
## 5 Unknown - extracted from report effect sizes
## 6 Unknown - extracted from report effect sizes
## 7 Unknown - extracted from report effect sizes
## 8 Unknown - extracted from report effect sizes
## 9 Unknown - extracted from report effect sizes
## 10 Unknown - extracted from report effect sizes
## 11 Unknown - extracted from report effect sizes
## 12 Unknown - extracted from report effect sizes
## 13 Unknown - extracted from report effect sizes
## 14 Unknown - extracted from report effect sizes
## main_es_method
## <chr>
## 1 Raw diff-in-diffs
## 2 Raw diff-in-diffs
## 3 Raw diff-in-diffs
## 4 Raw diff-in-diffs
## 5 Covariate-adjusted es from multi-level regression
## 6 Covariate-adjusted es from multi-level regression
## 7 Covariate-adjusted es from multi-level regression
## 8 Covariate-adjusted es from multi-level regression
## 9 Covariate-adjusted es from multi-level regression
## 10 Covariate-adjusted es from multi-level regression
## 11 Covariate-adjusted es from multi-level regression
## 12 Covariate-adjusted es from multi-level regression
## 13 Covariate-adjusted es from multi-level regression
## 14 Covariate-adjusted es from multi-level regression
## analysis_plan b_reg se_b_reg t_val es_paper
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 All mental health outcomes/Depression NA NA NA NA
## 2 All mental health outcomes/Depression NA NA NA NA
## 3 All mental health outcomes/Depression NA NA NA NA
## 4 All mental health outcomes/Depression NA NA NA NA
## 5 Wellbeing and Quality of Life 1.12 0.9 1.244 0.31
## 6 Wellbeing and Quality of Life 1.32 0.7 1.886 0.36
## 7 Wellbeing and Quality of Life 0.27 0.43 0.6279 0.12
## 8 Wellbeing and Quality of Life 0.74 0.44 1.682 0.34
## 9 Wellbeing and Quality of Life 0.52 0.26 2 0.48
## 10 Wellbeing and Quality of Life 0.46 0.24 1.917 0.42
## 11 Wellbeing and Quality of Life 0.63 0.95 0.6632 0.14
## 12 Wellbeing and Quality of Life 1.25 0.89 1.404 0.28
## 13 Social functioning (degree of impairment) 2.43 1.01 2.406 0.57
## 14 Social functioning (degree of impairment) 1.68 0.93 1.806 0.4
## es_paper_type sd_total
## <chr> <dbl>
## 1 <NA> NA
## 2 <NA> NA
## 3 <NA> NA
## 4 <NA> NA
## 5 Covariate-adjusted ES (d) from a multi-level model 3.613
## 6 Covariate-adjusted ES (d) from a multi-level model 3.667
## 7 Covariate-adjusted ES (d) from a multi-level model 2.25
## 8 Covariate-adjusted ES (d) from a multi-level model 2.176
## 9 Covariate-adjusted ES (d) from a multi-level model 1.083
## 10 Covariate-adjusted ES (d) from a multi-level model 1.095
## 11 Covariate-adjusted ES (d) from a multi-level model 4.5
## 12 Covariate-adjusted ES (d) from a multi-level model 4.464
## 13 Covariate-adjusted ES (d) from a multi-level model 4.263
## 14 Covariate-adjusted ES (d) from a multi-level model 4.2
## study vary_id ppcor ppcor_method df_ind
## <chr> <chr> <dbl> <chr> <dbl>
## 1 Michalak et al. 2015 HAM-D/MBCT 0.5 Imputed 71
## 2 Michalak et al. 2015 BDI/MBCT 0.5 Imputed 71
## 3 Michalak et al. 2015 HAM-D/CBASP 0.5 Imputed 70
## 4 Michalak et al. 2015 BDI/CBASP 0.5 Imputed 70
## 5 Michalak et al. 2015 SF-36/Vitality/MBCT 0.5 Imputed 71
## 6 Michalak et al. 2015 SF-36/Vitality/CBASP 0.5 Imputed 70
## 7 Michalak et al. 2015 SF-36/Social func/MBCT 0.5 Imputed 71
## 8 Michalak et al. 2015 SF-36/Social func/CBASP 0.5 Imputed 70
## 9 Michalak et al. 2015 SF-36/Role/MBCT 0.5 Imputed 71
## 10 Michalak et al. 2015 SF-36/Role/CBASP 0.5 Imputed 70
## 11 Michalak et al. 2015 SF-36/Mental health/MBCT 0.5 Imputed 71
## 12 Michalak et al. 2015 SF-36/Mental health/CBASP 0.5 Imputed 70
## 13 Michalak et al. 2015 SASS/overall/MBCT 0.5 Imputed 71
## 14 Michalak et al. 2015 SASS/overall/CBASP 0.5 Imputed 70
## m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3.3 9.347 0.3531 0.05723 0.05635 0.9894 0.3493 0.05721 0.05635
## 2 5.65 11.24 0.5026 0.05813 0.05635 0.9894 0.4973 0.05809 0.05635
## 3 6.52 8.512 0.7660 0.06133 0.05714 0.9892 0.7577 0.06124 0.05714
## 4 6.06 11.46 0.5287 0.05914 0.05714 0.9892 0.5230 0.05910 0.05714
## 5 NA 3.594 NA NA NA 0.9894 NA NA NA
## 6 NA 3.632 NA NA NA 0.9892 NA NA NA
## 7 NA 2.262 NA NA NA 0.9894 NA NA NA
## 8 NA 2.160 NA NA NA 0.9892 NA NA NA
## 9 NA 1.059 NA NA NA 0.9894 NA NA NA
## 10 NA 1.078 NA NA NA 0.9892 NA NA NA
## 11 NA 4.521 NA NA NA 0.9894 NA NA NA
## 12 NA 4.452 NA NA NA 0.9892 NA NA NA
## 13 NA 4.113 NA NA NA 0.9894 NA NA NA
## 14 NA 4.144 NA NA NA 0.9892 NA NA NA
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD d_reg
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.17 2.71 0.2632 0.05684 0.05635 0.2604 0.05683 0.05635 NA
## 2 8.62 1.420 0.6405 0.05924 0.05635 0.6337 0.05918 0.05635 NA
## 3 10.07 2.71 0.8647 0.06248 0.05714 0.8554 0.06237 0.05714 NA
## 4 7.98 1.420 0.5724 0.05948 0.05714 0.5662 0.05943 0.05714 NA
## 5 NA NA NA NA NA NA NA NA 0.3116
## 6 NA NA NA NA NA NA NA NA 0.3634
## 7 NA NA NA NA NA NA NA NA 0.1194
## 8 NA NA NA NA NA NA NA NA 0.3426
## 9 NA NA NA NA NA NA NA NA 0.4911
## 10 NA NA NA NA NA NA NA NA 0.4266
## 11 NA NA NA NA NA NA NA NA 0.1393
## 12 NA NA NA NA NA NA NA NA 0.2808
## 13 NA NA NA NA NA NA NA NA 0.5908
## 14 NA NA NA NA NA NA NA NA 0.4054
## vd_reg Wd_reg g_reg vg_reg Wg_reg avg_cl_size avg_cl_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 NA NA NA NA NA 6 From study (p. 177)
## 2 NA NA NA NA NA 6 From study (p. 177)
## 3 NA NA NA NA NA 6 From study (p. 177)
## 4 NA NA NA NA NA 6 From study (p. 177)
## 5 0.06338 0.06270 0.3083 0.06204 0.06270 6 From study (p. 177)
## 6 0.03808 0.03714 0.3595 0.03727 0.03714 6 From study (p. 177)
## 7 0.03623 0.03613 0.1181 0.03547 0.03613 6 From study (p. 177)
## 8 0.04233 0.04149 0.3389 0.04143 0.04149 6 From study (p. 177)
## 9 0.06200 0.06030 0.4859 0.06069 0.06030 6 From study (p. 177)
## 10 0.05084 0.04954 0.4220 0.04975 0.04954 6 From study (p. 177)
## 11 0.04429 0.04415 0.1379 0.04335 0.04415 6 From study (p. 177)
## 12 0.04053 0.03996 0.2778 0.03966 0.03996 6 From study (p. 177)
## 13 0.06275 0.06029 0.5845 0.06143 0.06029 6 From study (p. 177)
## 14 0.05154 0.05036 0.4010 0.05044 0.05036 6 From study (p. 177)
## icc icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1 Imputed 1 0.971 67.17 0.9888 0.3390 0.06825
## 2 0.1 Imputed 1 0.971 67.17 0.9888 0.4826 0.06913
## 3 0.1 Imputed 1 0.971 66.23 0.9886 0.7353 0.07265
## 4 0.1 Imputed 1 0.971 66.23 0.9886 0.5076 0.07052
## 5 0.1 Imputed 1 0.971 67.17 0.9888 NA NA
## 6 0.1 Imputed 1 0.971 66.23 0.9886 NA NA
## 7 0.1 Imputed 1 0.971 67.17 0.9888 NA NA
## 8 0.1 Imputed 1 0.971 66.23 0.9886 NA NA
## 9 0.1 Imputed 1 0.971 67.17 0.9888 NA NA
## 10 0.1 Imputed 1 0.971 66.23 0.9886 NA NA
## 11 0.1 Imputed 1 0.971 67.17 0.9888 NA NA
## 12 0.1 Imputed 1 0.971 66.23 0.9886 NA NA
## 13 0.1 Imputed 1 0.971 67.17 0.9888 NA NA
## 14 0.1 Imputed 1 0.971 66.23 0.9886 NA NA
## Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.06739 0.2527 0.06787 0.06739 0.1186 0.01489 67.17 67.17
## 2 0.06739 0.6150 0.07021 0.06739 0.2871 0.01489 67.17 67.17
## 3 0.06857 0.8300 0.07377 0.06857 0.3847 0.01510 66.23 66.23
## 4 0.06857 0.5494 0.07085 0.06857 0.2564 0.01510 66.23 66.23
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
## 7 NA NA NA NA NA NA NA NA
## 8 NA NA NA NA NA NA NA NA
## 9 NA NA NA NA NA NA NA NA
## 10 NA NA NA NA NA NA NA NA
## 11 NA NA NA NA NA NA NA NA
## 12 NA NA NA NA NA NA NA NA
## 13 NA NA NA NA NA NA NA NA
## 14 NA NA NA NA NA NA NA NA
## n_covariates_DD adj_fct_DD adj_value_DD gt_reg vgt_reg Wgt_reg hg_reg
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 eta 1.196 NA NA NA NA
## 2 1 eta 1.196 NA NA NA NA
## 3 1 eta 1.2 NA NA NA NA
## 4 1 eta 1.2 NA NA NA NA
## 5 NA <NA> NA 0.2992 0.05517 0.05450 0.1560
## 6 NA <NA> NA 0.3489 0.03319 0.03227 0.2375
## 7 NA <NA> NA 0.1146 0.03151 0.03141 0.07885
## 8 NA <NA> NA 0.3289 0.03687 0.03606 0.2120
## 9 NA <NA> NA 0.4715 0.05407 0.05242 0.2500
## 10 NA <NA> NA 0.4095 0.04432 0.04305 0.2414
## 11 NA <NA> NA 0.1338 0.03851 0.03838 0.08328
## 12 NA <NA> NA 0.2695 0.03528 0.03473 0.1773
## 13 NA <NA> NA 0.5672 0.05481 0.05241 0.3000
## 14 NA <NA> NA 0.3892 0.04491 0.04377 0.2276
## vhg_reg h_reg df_reg n_covariates_reg adj_fct_reg adj_value_reg
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 NA NA NA NA <NA> NA
## 2 NA NA NA NA <NA> NA
## 3 NA NA NA NA <NA> NA
## 4 NA NA NA NA <NA> NA
## 5 0.01489 67.17 67.17 1 gamma 0.943
## 6 0.01510 66.23 66.23 1 gamma 0.943
## 7 0.01489 67.17 67.17 1 gamma 0.943
## 8 0.01510 66.23 66.23 1 gamma 0.943
## 9 0.01489 67.17 67.17 1 gamma 0.943
## 10 0.01510 66.23 66.23 1 gamma 0.943
## 11 0.01489 67.17 67.17 1 gamma 0.943
## 12 0.01510 66.23 66.23 1 gamma 0.943
## 13 0.01489 67.17 67.17 1 gamma 0.943
## 14 0.01510 66.23 66.23 1 gamma 0.943
Data from table 2 containing means and standard deviation on page 136
# Data from table 2 containing means and standard deviation on page 136
Morley2014 <- tibble(
group = as.factor(rep(c("Intervention",
"Control"),
each = 1,4)),
outcome = as.factor(rep(c("BSS",
"HADS_depression",
"HADS_anxiety",
"SES"), each = 2,1
)),
N = rep(c(
122, 63 # obtained from Table 1 (p. 135)
), each = 1,4),
N_start = rep(c(
122, 63 # obtained from Table 1 (p. 135)
), each = 1,4),
# q = 6, # Controlling for Unemployment status, Suicide Ideation, recent cannabis use,
# recent heroin use, life time cocaine use, lifetime amphetamine use (p. 134)
m_pre = c(
9.5, 12.56, # Beck Scale for Suicide Ideation (range 0–38)
9.3, 9.89, # HAD Scale Depression (range 0–21)
12.58, 12.35, # HAD Scale Anxiety (range 0–21)
61.76, 65.09 # Self-Efficacy Scale (range 0–90)
),
sd_pre = c(
9.61, 8.55,
6.66, 5.6,
6.66, 5.39,
15.34, 12.55
),
m_post = c(
5.83, 6,
6.4, 7.1,
8.83, 9.71,
65.31, 65.13
),
sd_post = c(
5.58, 6.61,
5.43, 4.3,
5.72, 4.3,
12.49, 9.58
)
); Morley2014
## # A tibble: 8 × 8
## group outcome N N_start m_pre sd_pre m_post sd_post
## <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention BSS 122 122 9.5 9.61 5.83 5.58
## 2 Control BSS 63 63 12.56 8.55 6 6.61
## 3 Intervention HADS_depression 122 122 9.3 6.66 6.4 5.43
## 4 Control HADS_depression 63 63 9.89 5.6 7.1 4.3
## 5 Intervention HADS_anxiety 122 122 12.58 6.66 8.83 5.72
## 6 Control HADS_anxiety 63 63 12.35 5.39 9.71 4.3
## 7 Intervention SES 122 122 61.76 15.34 65.31 12.49
## 8 Control SES 63 63 65.09 12.55 65.13 9.58
# Turning dataset into wide format
Morley2014_wide <-
Morley2014 |>
mutate (group = case_match(
group, "Intervention" ~ "t",
"Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
# Effect size calculating
Morley2014_est <-
Morley2014_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "BSS") ~ "All mental health outcomes",
str_detect(outcome, "HADS_depression") ~ "All mental health outcomes/Depression",
str_detect(outcome, "HADS_anxiety") ~ "All mental health outcomes/Anxiety",
str_detect(outcome, "SES") ~ "Hope, Empowerment & Self-efficacy",
.default = NA_character_
),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
study = "Morley et al. 2014",
N_total = N_t + N_c,
df_ind = N_total,
# Reverting m_post for specific outcomes
m_post = if_else(outcome %in% c("BSS", "HADS_depression", "HADs_anxiety"),
(m_post_t - m_post_c) * -1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# Reverting specific values
m_diff_t = if_else(outcome %in% c("BSS",
"HADS_depression",
"HADs_anxiety"),
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome %in% c("BSS",
"HADS_depression",
"HADs_anxiety"),
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Group sizes was between 6 to 8
avg_cl_size = 7,
avg_cl_type = "From study (p. 132)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)
) |>
ungroup() |>
mutate(
vary_id = outcome
); Morley2014_est
## # A tibble: 4 × 61
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BSS 122 63 122 63 9.5 12.56 9.61
## 2 HADS_depression 122 63 122 63 9.3 9.89 6.66
## 3 HADS_anxiety 122 63 122 63 12.58 12.35 6.66
## 4 SES 122 63 122 63 61.76 65.09 15.34
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 8.55 5.83 6 5.58 6.61
## 2 5.6 6.4 7.1 5.43 4.3
## 3 5.39 8.83 9.71 5.72 4.3
## 4 12.55 65.31 65.13 12.49 9.58
## analysis_plan effect_size sd_used
## <chr> <chr> <chr>
## 1 All mental health outcomes SMD Pooled posttest SD
## 2 All mental health outcomes/Depression SMD Pooled posttest SD
## 3 All mental health outcomes/Anxiety SMD Pooled posttest SD
## 4 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## main_es_method ppcor ppcor_method study N_total df_ind m_post
## <chr> <dbl> <chr> <chr> <dbl> <dbl> <dbl>
## 1 Raw diff-in-diffs 0.5 Imputed Morley et al. 2014 185 185 0.17
## 2 Raw diff-in-diffs 0.5 Imputed Morley et al. 2014 185 185 0.7000
## 3 Raw diff-in-diffs 0.5 Imputed Morley et al. 2014 185 185 -0.8800
## 4 Raw diff-in-diffs 0.5 Imputed Morley et al. 2014 185 185 0.1800
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.949 0.02858 0.02407 0.02407 0.9959 0.02846 0.02407 0.02407 3.67
## 2 5.075 0.1379 0.02412 0.02407 0.9959 0.1374 0.02412 0.02407 2.9
## 3 5.282 -0.1666 0.02414 0.02407 0.9959 -0.1659 0.02414 0.02407 -3.75
## 4 11.59 0.01554 0.02407 0.02407 0.9959 0.01547 0.02407 0.02407 3.550
## m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6.56 -0.4858 0.02471 0.02407 -0.4838 0.02470 0.02407 7
## 2 2.79 0.02167 0.02407 0.02407 0.02159 0.02407 0.02407 7
## 3 -2.64 -0.2102 0.02419 0.02407 -0.2093 0.02419 0.02407 7
## 4 0.04000 0.3029 0.02432 0.02407 0.3017 0.02432 0.02407 7
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 132) 0.1 Imputed 1 0.981 175.4 0.9957
## 2 From study (p. 132) 0.1 Imputed 1 0.981 175.4 0.9957
## 3 From study (p. 132) 0.1 Imputed 1 0.981 175.4 0.9957
## 4 From study (p. 132) 0.1 Imputed 1 0.981 175.4 0.9957
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.02791 0.02739 0.02739 -0.4745 0.02803 0.02739 -0.2156 0.005701 175.4
## 2 0.1347 0.02744 0.02739 0.02117 0.02739 0.02739 0.009658 0.005701 175.4
## 3 -0.1627 0.02747 0.02739 -0.2053 0.02751 0.02739 -0.09358 0.005701 175.4
## 4 0.01518 0.02739 0.02739 0.2959 0.02764 0.02739 0.1348 0.005701 175.4
## df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <chr> <dbl> <fct>
## 1 175.4 1 eta 1.138 BSS
## 2 175.4 1 eta 1.138 HADS_depression
## 3 175.4 1 eta 1.138 HADS_anxiety
## 4 175.4 1 eta 1.138 SES
Data is extracted from Table 3 containing means and standard deviation (p. 538)
# Data from table 3 containing means and standard deviation (p. 538)
Morton2012 <- tibble(
group = as.factor(rep(c("Intervention",
"Control"),
each = 1,4)),
outcome = as.factor(rep(c("BEST_composite",
# "BEST_BPD_thoughts_&_feelings", The subscaled are removed
# we only use total-scale
# "BEST_BPD_negative_behaviors",
# "BEST_BPD_positive_behaviors",
# "DASS_stress",
"DASS_anxiety",
# "DASS_depression",
"BHS",
# "AAQ-II",
"DERS_total"
# "FFMQ_total",
# "ACS_total"
),
each = 2,1)),
N = rep(c(21, 20),
each = 1,4),
m_pre = c(
44.57, 49.80, # BEST composite
# 28.48, 30.3, # DASS stress
23.33, 24.20,# DASS anxiety
# 31.52, 33.7, # DASS depression
14.40, 15.7, # BHS
# 24.10, 22.55,# AAQ-II
131.76, 134.42 # DERS total
# 96.52, 92.15,# FFMQ total
# 4.86, 4.93 # ACS total
),
sd_pre = c(
11.16, 12.35,
# 10.04, 10.16,
9.34, 11.76,
# 10.86, 8.74,
4.87, 3.58,
# 9.29, 8.32,
25.15, 19.45
# 23.01, 20.81,
# 0.74, 0.68
),
m_post = c(
32.76, 47.42,
# 26.55, 31.57,
19.67, 26.28,
# 22.67, 31.00,
9.7, 16.43,
# 35.3, 23.1,
113.04, 140.04
# 108.81, 90.87,
# 4.35, 5.08
),
sd_post = c(
12.47, 11.00,
# 11.58, 9.93,
11.02, 8.33,
# 14.73, 8.51,
6.34, 3.69,
# 10.8, 7.1,
17.64, 20.88
# 19.11, 20.67,
# 0.65, 0.56
)
); Morton2012
## # A tibble: 8 × 7
## group outcome N m_pre sd_pre m_post sd_post
## <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention BEST_composite 21 44.57 11.16 32.76 12.47
## 2 Control BEST_composite 20 49.8 12.35 47.42 11
## 3 Intervention DASS_anxiety 21 23.33 9.34 19.67 11.02
## 4 Control DASS_anxiety 20 24.2 11.76 26.28 8.33
## 5 Intervention BHS 21 14.4 4.87 9.7 6.34
## 6 Control BHS 20 15.7 3.58 16.43 3.69
## 7 Intervention DERS_total 21 131.8 25.15 113.0 17.64
## 8 Control DERS_total 20 134.4 19.45 140.0 20.88
Morton2012_wide <-
Morton2012 |>
mutate (group = case_match(
group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Morton2012_wide2 <- tibble(
outcome = c("DASS_stress",
"DASS_depression"),
N_t = c(21),
N_c = c(20),
m_pre_t = c(
28.48,
31.52
),
m_pre_c = c(
30.3,
33.70
),
sd_pre_t = c(
10.04,
10.86
),
sd_pre_c = c(
10.16,
8.74
),
m_post_t = c(
26.55,
22.67
),
m_post_c = c(
31.57,
31
),
sd_post_t = c(
11.58,
14.73
),
sd_post_c = c(
9.93,
8.51
)
)
Morton2012_est <-
bind_rows(
Morton2012_wide,
Morton2012_wide2
) |>
mutate(
study = "Morton et al. 2012",
analysis_plan = case_when(
str_detect(outcome, "BEST|DASS") ~ "All mental health outcomes",
str_detect(outcome, "BHS") ~ "Hope, Empowerment & Self-efficacy",
str_detect(outcome, "DERS") ~ "All mental health outcomes/Unused outcomes",
.default = NA_character_
),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# Entering test-retest reliability measure from text and
# Pfohl, B., Blum, N., St. John, D., McCormick, B., Allen, J., & Black, D.W.
# (2009). Reliability and validity of the Borderline Evaluation of
# Severity over Time (BEST): A self-rated scale tomeasure severity and
# change in persons with Borderline Personality Disorder. Journal of
# Personality Disorders, 23, 281–293.
ppcor = case_when(
str_detect(outcome, "BEST") ~ 0.62,
str_detect(outcome, "DASS") ~ 0.81,
str_detect(outcome, "BHS") ~ 0.69,
str_detect(outcome, "DERS") ~ 0.88,
.default = ppcor_imp
),
ppcor_method = "Obtained from test-retest reliability measures"
)
Morton2012_est <-
Morton2012_est|>
mutate(
N_start_t = N_t,
N_start_c = N_c,
N_total = N_t + N_c,
df_ind = N_total,
# reverting all scores as lower score is beneficial
m_post = (m_post_t - m_post_c) * -1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# reverting all scores as lower score is beneficial
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Morton2012_est
## # A tibble: 6 × 61
## outcome N_t N_c m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BEST_composite 21 20 44.57 49.8 11.16 12.35 32.76
## 2 DASS_anxiety 21 20 23.33 24.2 9.34 11.76 19.67
## 3 BHS 21 20 14.4 15.7 4.87 3.58 9.7
## 4 DERS_total 21 20 131.8 134.4 25.15 19.45 113.0
## 5 DASS_stress 21 20 28.48 30.3 10.04 10.16 26.55
## 6 DASS_depression 21 20 31.52 33.7 10.86 8.74 22.67
## m_post_c sd_post_t sd_post_c study
## <dbl> <dbl> <dbl> <chr>
## 1 47.42 12.47 11 Morton et al. 2012
## 2 26.28 11.02 8.33 Morton et al. 2012
## 3 16.43 6.34 3.69 Morton et al. 2012
## 4 140.0 17.64 20.88 Morton et al. 2012
## 5 31.57 11.58 9.93 Morton et al. 2012
## 6 31 14.73 8.51 Morton et al. 2012
## analysis_plan effect_size sd_used
## <chr> <chr> <chr>
## 1 All mental health outcomes SMD Pooled posttest SD
## 2 All mental health outcomes SMD Pooled posttest SD
## 3 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 4 All mental health outcomes/Unused outcomes SMD Pooled posttest SD
## 5 All mental health outcomes SMD Pooled posttest SD
## 6 All mental health outcomes SMD Pooled posttest SD
## main_es_method ppcor ppcor_method
## <chr> <dbl> <chr>
## 1 Raw diff-in-diffs 0.62 Obtained from test-retest reliability measures
## 2 Raw diff-in-diffs 0.81 Obtained from test-retest reliability measures
## 3 Raw diff-in-diffs 0.69 Obtained from test-retest reliability measures
## 4 Raw diff-in-diffs 0.88 Obtained from test-retest reliability measures
## 5 Raw diff-in-diffs 0.81 Obtained from test-retest reliability measures
## 6 Raw diff-in-diffs 0.81 Obtained from test-retest reliability measures
## N_start_t N_start_c N_total df_ind m_post sd_pool d_post vd_post Wd_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 21 20 41 41 14.66 11.78 1.245 0.1165 0.09762
## 2 21 20 41 41 6.61 9.802 0.6743 0.1032 0.09762
## 3 21 20 41 41 6.73 5.220 1.289 0.1179 0.09762
## 4 21 20 41 41 27 19.29 1.400 0.1215 0.09762
## 5 21 20 41 41 5.02 10.81 0.4645 0.1003 0.09762
## 6 21 20 41 41 8.33 12.11 0.6881 0.1034 0.09762
## J g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9816 1.222 0.1158 0.09762 11.81 2.380 0.8007 0.08201 0.07419 0.7860
## 2 0.9816 0.6619 0.1030 0.09762 3.660 -2.080 0.5856 0.04128 0.03710 0.5748
## 3 0.9816 1.266 0.1172 0.09762 4.7 -0.730 1.040 0.07372 0.06052 1.021
## 4 0.9816 1.374 0.1206 0.09762 18.72 -5.620 1.262 0.04285 0.02343 1.239
## 5 0.9816 0.4559 0.1002 0.09762 1.93 -1.27 0.2961 0.03816 0.03710 0.2906
## 6 0.9816 0.6754 0.1032 0.09762 8.85 2.700 0.5080 0.04024 0.03710 0.4987
## vg_DD Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt
## <dbl> <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.08172 0.07419 8 Imputed 0.1 Imputed 1 0.966
## 2 0.04112 0.03710 8 Imputed 0.1 Imputed 1 0.966
## 3 0.07324 0.06052 8 Imputed 0.1 Imputed 1 0.966
## 4 0.04214 0.02343 8 Imputed 0.1 Imputed 1 0.966
## 5 0.03813 0.03710 8 Imputed 0.1 Imputed 1 0.966
## 6 0.04013 0.03710 8 Imputed 0.1 Imputed 1 0.966
## df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 37.89 0.9801 1.179 0.1443 0.1259 0.7581 0.1033 0.09571 0.3930 0.02639
## 2 37.89 0.9801 0.6384 0.1313 0.1259 0.5544 0.05191 0.04785 0.4061 0.02639
## 3 37.89 0.9801 1.221 0.1456 0.1259 0.9849 0.09088 0.07808 0.5580 0.02639
## 4 37.89 0.9801 1.325 0.1491 0.1259 1.195 0.04906 0.03022 1.025 0.02639
## 5 37.89 0.9801 0.4398 0.1285 0.1259 0.2803 0.04889 0.04785 0.2074 0.02639
## 6 37.89 0.9801 0.6515 0.1315 0.1259 0.4810 0.05091 0.04785 0.3535 0.02639
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 37.89 37.89 1 eta 1.29 BEST_composite
## 2 37.89 37.89 1 eta 1.29 DASS_anxiety
## 3 37.89 37.89 1 eta 1.29 BHS
## 4 37.89 37.89 1 eta 1.29 DERS_total
## 5 37.89 37.89 1 eta 1.29 DASS_stress
## 6 37.89 37.89 1 eta 1.29 DASS_depression
# Regression coefficients extracted from text (pp.537-539)
# Not used for analysis!
morton2012_es <- tibble(
study = "morton2012",
es_method = "Multilevel model",
group = rep(c("treatment", # Treatment is ACT + TAU
"control", # Control is TAU.
"interaction"), each = 1,4),
outcome = rep(c(
"BEST_composite",
# "BEST_BPD_thoughts_feelings",
# "BEST_BPD_negative_behaviors",
"DASS_anxiety",
"BHS",
# "AAQ-II",
"DERS_total"
# "FFMQ_total",
# "ACS_total"
), each = 3,1),
beta = c(-11.52, -1.8, 9.71, # BEST Composite
# -6.6, -0.05, 6.54, # BEST BPD thoughts and feelings
# -1.11, -3.98, 2.87, # BEST BPD negative and behaviors
-3.92, 3.98, 7.90, # DASS anxiety
-4.93, 0.62, 5.55, # BHS
# 5.55, 0.37, -9.88, # AAQ-II
-19.17, 4.77, 23.94 # DERS total
# 12.30, -0.31, -12.62, # FFMQ total
# -0.54, 0.18, 0.71), # ACS total
),
se = c(2.75, 3.19, 4.21,
# 1.77, 2.05, 2.72,
# 1.04, 0.90, 1.38,
2.24, 2.50, 3.36,
1.27, 1.38, 1.87,
# 1.87, 2.65, 3.60,
5.68, 6.30, 8.48
# 3.71, 4.06, 5.50,
# 0.15, 0.16, 0.21),
),
t = c(2.3, -0.57, 2.3,
# -3.72, -0.03, 2.41,
# -1.06, -4.42, 2.08,
-1.74, 1.59, 2.35,
-3.88, 0.45, 2.96,
# 2.96, 0.139, -2.74,
-3.38, 0.76, 2.82
# 3.31, -0.08, -2.29,
# -3.63, 1.15, 3.33), # unsure about this
),
p = c(0.000, 0.575, 0.28,
# 0.001, 0.979, 0.022,
# 0.296, 0.0, 0.046,
0.091, 0.121, 0.025,
0.000, 0.656, 0.006,
# 0.006, 0.891, 0.010,
0.002, 0.454, 0.008
# 0.002, 0.939, 0.028,
# 0.001, 0.258, 0.002),
),
d = c(0.99,0.15, 0.81,
# 0.88, 0.01, 0.85,
# 1.05, 0.29, 0.75,
0.41, 0.41, 0.83,
0.91, 0.11, 1.02,
# 1.02, 0.04, 0.99,
0.78, 0.19, 0.98
# 0.79, 0.02, 0.80,
# 0.89, 0.30, 1.20)
)
)
Data was extracted from Table 3 (p. 21)
# Data from Table 3 (p. 21) containing means, standard deviation. It also contains
# Time X Interaction coefficients with p-values (estimated with ANOVA)
Patterson2003 <-
tibble(
group = as.factor(rep(c("FAST Intervention",
"Treatment-as-Usual"),
each = 1, 10)),
timing = rep(c("3m", "6m"), each = 10,1),
outcome = as.factor(rep(c(
# "UPSA",
"PANSS_Positive",
"PANSS_Negative",
"PANSS_General",
"HAM_D",
"QWB"), each = 2, 2)),
N = 16,
N_start = 16,
m_pre = rep(c(
# 31.9, 41.5, # UPSA
12.5, 10.4, # PANSS Positive
16.9, 10.1, # PANSS Negative
25.0, 22.3, # PANSS General
7.8, 4.6, # Ham-D
0.53, 0.49 # QWB
), each = 1,2),
sd_pre = rep(c(
# 11.8, 8.3, # UPSA
5.6, 4.0, # PANSS Positive
6.6, 3.2, # PANSS Negative
6.2, 3.7, # PANSS General
6.1, 2.8, # Ham-D
0.08, 0.08 # QWB
), each = 1,2),
m_post = c(
# 41.5, 40.3, # UPSA 3 months
13.0, 14.0, # PANSS Positive 3 months
13.0, 10.9, # PANSS Negative 3 months
21.9, 21.5, # PANSS General 3 months
7.7, 8.0, # Ham-D 3 months
0.55, 0.5, # QWB 3 months
# 42.7, 41.6, # UPSA 6 months
12.13, 13.1, # PANSS Positive 6 months
14.3, 12.4, # PANSS Negative 6 months
23.9, 23.9, # PANSS General 6 months
7.2, 7.9, # Ham-D 6 months
0.51, 0.49 # QWB 6 months
),
sd_post = c(
# 9.5, 7.1, # UPSA 3 months
6.6, 6.3, # PANSS Positive 3 months
5.1, 4.0, # PANSS Negative 3 months
4.7, 4.9, # PANSS General 3 months
5.2, 5.3, # Ham-D 3 months
0.10, 0.07, # QWB 3 months
# 9.7, 9.7, # UPSA 6 months
4.3, 5.9, # PANSS Positive 6 months
6, 4.4, # PANSS Negative 6 months
4.6, 4.4, # PANSS General 6 months
4.9, 5.0, # Ham-D 6 months
0.07, 0.07 # QWB 6 months
)
)
# Making the patterson2003 tibble wide in order to estimate the effect sizes and
# further analysis.
Patterson2003_wide <-
Patterson2003 |>
mutate(group = case_match(group, "FAST Intervention" ~ "t", "Treatment-as-Usual" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Patterson2003_est <-
Patterson2003_wide |>
# Based on the degrees of freedom value reported in Druss et al. 2018 table 2 and 3
mutate(
analysis_plan = case_when(
str_detect(outcome, "PANSS_General|PANSS_Negative|PANSS_Positive") ~ "All mental health outcomes/Symptoms of psychosis",
str_detect(outcome, "HAM_D") ~ "All mental health outcomes/Depression",
str_detect(outcome, "QWB") ~ "Wellbeing and Quality of Life",
.default = NA_character_
),
study = "Patterson et al. 2003",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# For PANSS and HAM-D lower scores are beneficial why these is reverted
m_post = if_else(analysis_plan %in% c("All mental health outcomes/Symptoms of psychosis",
"All mental health outcomes/Depression"),
(m_post_t - m_post_c)*-1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# reverting specific scores as lower score is beneficial
m_diff_t = if_else(analysis_plan %in% c("All mental health outcomes/Symptoms of psychosis",
"All mental health outcomes/Depression"),
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t),
m_diff_c = if_else(analysis_plan %in% c("All mental health outcomes/Symptoms of psychosis",
"All mental health outcomes/Depression"),
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)
) |>
ungroup() |>
mutate(
vary_id = paste0(outcome, "/", timing)
); Patterson2003_est
## # A tibble: 10 × 62
## timing outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c
## <chr> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3m PANSS_Positive 16 16 16 16 12.5 10.4
## 2 3m PANSS_Negative 16 16 16 16 16.9 10.1
## 3 3m PANSS_General 16 16 16 16 25 22.3
## 4 3m HAM_D 16 16 16 16 7.8 4.6
## 5 3m QWB 16 16 16 16 0.53 0.49
## 6 6m PANSS_Positive 16 16 16 16 12.5 10.4
## 7 6m PANSS_Negative 16 16 16 16 16.9 10.1
## 8 6m PANSS_General 16 16 16 16 25 22.3
## 9 6m HAM_D 16 16 16 16 7.8 4.6
## 10 6m QWB 16 16 16 16 0.53 0.49
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.6 4 13 14 6.6 6.3
## 2 6.6 3.2 13 10.9 5.1 4
## 3 6.2 3.7 21.9 21.5 4.7 4.9
## 4 6.1 2.8 7.7 8 5.2 5.3
## 5 0.08 0.08 0.55 0.5 0.1 0.07
## 6 5.6 4 12.13 13.1 4.3 5.9
## 7 6.6 3.2 14.3 12.4 6 4.4
## 8 6.2 3.7 23.9 23.9 4.6 4.4
## 9 6.1 2.8 7.2 7.9 4.9 5
## 10 0.08 0.08 0.51 0.49 0.07 0.07
## analysis_plan study
## <chr> <chr>
## 1 All mental health outcomes/Symptoms of psychosis Patterson et al. 2003
## 2 All mental health outcomes/Symptoms of psychosis Patterson et al. 2003
## 3 All mental health outcomes/Symptoms of psychosis Patterson et al. 2003
## 4 All mental health outcomes/Depression Patterson et al. 2003
## 5 Wellbeing and Quality of Life Patterson et al. 2003
## 6 All mental health outcomes/Symptoms of psychosis Patterson et al. 2003
## 7 All mental health outcomes/Symptoms of psychosis Patterson et al. 2003
## 8 All mental health outcomes/Symptoms of psychosis Patterson et al. 2003
## 9 All mental health outcomes/Depression Patterson et al. 2003
## 10 Wellbeing and Quality of Life Patterson et al. 2003
## effect_size sd_used main_es_method ppcor ppcor_method N_total
## <chr> <chr> <chr> <dbl> <chr> <dbl>
## 1 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 2 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 3 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 4 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 5 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 6 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 7 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 8 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 9 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## 10 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 32
## df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 32 1 6.452 0.1550 0.1254 0.125 0.9764 0.1513 0.1254
## 2 32 -2.1 4.583 -0.4582 0.1283 0.125 0.9764 -0.4474 0.1281
## 3 32 -0.4000 4.801 -0.08332 0.1251 0.125 0.9764 -0.08135 0.1251
## 4 32 0.3000 5.250 0.05714 0.1251 0.125 0.9764 0.05579 0.1250
## 5 32 0.05000 0.08631 0.5793 0.1302 0.125 0.9764 0.5656 0.1300
## 6 32 0.9700 5.162 0.1879 0.1256 0.125 0.9764 0.1835 0.1255
## 7 32 -1.9 5.261 -0.3611 0.1270 0.125 0.9764 -0.3526 0.1269
## 8 32 0 4.501 0 0.125 0.125 0.9764 0 0.125
## 9 32 0.7 4.950 0.1414 0.1253 0.125 0.9764 0.1381 0.1253
## 10 32 0.02000 0.07 0.2857 0.1263 0.125 0.9764 0.2790 0.1262
## Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.125 -0.5 -3.6 0.4805 0.1286 0.125 0.4691 0.1284 0.125
## 2 0.125 3.9 -0.8000 1.026 0.1414 0.125 1.001 0.1407 0.125
## 3 0.125 3.1 0.8000 0.4791 0.1286 0.125 0.4677 0.1284 0.125
## 4 0.125 0.1000 -3.4 0.6666 0.1319 0.125 0.6509 0.1316 0.125
## 5 0.125 0.02000 0.01000 0.1159 0.1252 0.125 0.1131 0.1252 0.125
## 6 0.125 0.3700 -2.7 0.5947 0.1305 0.125 0.5806 0.1303 0.125
## 7 0.125 2.600 -2.3 0.9314 0.1386 0.125 0.9093 0.1379 0.125
## 8 0.125 1.100 -1.600 0.5999 0.1306 0.125 0.5857 0.1304 0.125
## 9 0.125 0.6000 -3.3 0.7878 0.1347 0.125 0.7692 0.1342 0.125
## 10 0.125 -0.02000 0 -0.2857 0.1263 0.125 -0.2790 0.1262 0.125
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 2 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 3 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 4 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 5 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 6 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 7 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 8 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 9 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## 10 8 Imputed 0.1 Imputed 1 0.963 29.3 0.9742
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1454 0.1629 0.1625 0.4508 0.1660 0.1625 0.2059 0.03413 29.3 29.3
## 2 -0.4299 0.1657 0.1625 0.9621 0.1783 0.1625 0.4341 0.03413 29.3 29.3
## 3 -0.07816 0.1626 0.1625 0.4494 0.1659 0.1625 0.2052 0.03413 29.3 29.3
## 4 0.05361 0.1625 0.1625 0.6254 0.1692 0.1625 0.2847 0.03413 29.3 29.3
## 5 0.5434 0.1675 0.1625 0.1087 0.1627 0.1625 0.04980 0.03413 29.3 29.3
## 6 0.1763 0.1630 0.1625 0.5579 0.1678 0.1625 0.2543 0.03413 29.3 29.3
## 7 -0.3388 0.1645 0.1625 0.8737 0.1755 0.1625 0.3953 0.03413 29.3 29.3
## 8 0 0.1625 0.1625 0.5627 0.1679 0.1625 0.2565 0.03413 29.3 29.3
## 9 0.1327 0.1628 0.1625 0.7391 0.1718 0.1625 0.3356 0.03413 29.3 29.3
## 10 0.2680 0.1637 0.1625 -0.2680 0.1637 0.1625 -0.1227 0.03413 29.3 29.3
## n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <chr> <dbl> <chr>
## 1 1 eta 1.3 PANSS_Positive/3m
## 2 1 eta 1.3 PANSS_Negative/3m
## 3 1 eta 1.3 PANSS_General/3m
## 4 1 eta 1.3 HAM_D/3m
## 5 1 eta 1.3 QWB/3m
## 6 1 eta 1.3 PANSS_Positive/6m
## 7 1 eta 1.3 PANSS_Negative/6m
## 8 1 eta 1.3 PANSS_General/6m
## 9 1 eta 1.3 HAM_D/6m
## 10 1 eta 1.3 QWB/6m
Data was extracted from Table 2 (p. 351)
# Data from Table 2 containing means and standard deviation + within effect size.
# Table also contains "between group-group post treatment effect size at post-tratement"
# with a coefficient and "Post hoc power" on page 351
Popolo2019 <-
tibble(
group = rep(c("Intervention",
"Control"),
each = 1,3),
outcome = rep(c("CORE_OM",
"DERS",
"TAS"
#"Metacognition_self",
#"Metacognition_others",
#"Metacognition_decentration",
#"Metacognition_mastery"
), each = 2,1),
N = rep(c(8, 10), 3),
N_start = 10,
m_pre = c(
12.85, 15.24, # CORE-OM Total
95, 100.9, # DERS Total
54.2, 51.5 # TAS Total
# 4.3, 4.1, # Metacognition Self
# 2.1, 2.85, # Metacognition Others
# 0.75, 1.15, # Metacognition Decentration
# 2.9, 3.3 # Metacognition Mastery
),
sd_pre = c(
4.6, 6.68,
16.19, 17.67,
11.52, 10.99
# 1.32, 0.97,
# 0.52, 1.31,
# 0.75, 1.03,
# 1.07, 0.67
),
m_post = c(
7.68, 11.78,
76.4, 97.11,
43.5, 52.63
# 5.75, 3.35,
# 2.9, 3.3,
# 1.15, 0.7,
# 4.18, 3.05
),
sd_post = c(
1.94, 4.59,
26.78, 29.17,
11.7, 12.59
# 1.36, 1.27,
# 1.07, 0.67,
# 1.03, 0.48,
# 1.35, 1.23
),
# Within-group effect size baseline – 3-month follow-up
within_group_d = c(
1.14, 0.64,
0.74, 0.16,
1.11, 0.10
# 1.73, 0.56,
# 0.99, 0.32,
# 0.59, 0.51,
# 1.51, 0.20
),
# To calculated the pre-posttest correlation, we need the standard deviation of
# the mean differences (sd_diff). As can be seen from page 351. We can obtain
# sd_diff from the reported within-group effect sizes as follows
sd_diff = abs(m_post - m_pre)/within_group_d,
# The group individual pre-posttest correlation can be obtained as follows.
# Note that we are not able to obtained correlations from d_rm = 0. This only
# concerns SCL90 pre-posttest effect sizes for the control group. Hereto,
#
r = (sd_pre^2 + sd_post^2 - sd_diff^2)/(2*sd_pre*sd_post),
# To estiamte the average pre-posttest correlation
z = 0.5 * log( (1+r)/(1-r) ),
v = 1/(N-3),
w = 1/v
); Popolo2019
## # A tibble: 6 × 14
## group outcome N N_start m_pre sd_pre m_post sd_post within_group_d
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention CORE_OM 8 10 12.85 4.6 7.68 1.94 1.14
## 2 Control CORE_OM 10 10 15.24 6.68 11.78 4.59 0.64
## 3 Intervention DERS 8 10 95 16.19 76.4 26.78 0.74
## 4 Control DERS 10 10 100.9 17.67 97.11 29.17 0.16
## 5 Intervention TAS 8 10 54.2 11.52 43.5 11.7 1.11
## 6 Control TAS 10 10 51.5 10.99 52.63 12.59 0.1
## sd_diff r z v w
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.535 0.2441 0.2491 0.2 5
## 2 5.406 0.5946 0.6848 0.1429 7
## 3 25.14 0.4008 0.4245 0.2 5
## 4 23.69 0.5840 0.6685 0.1429 7
## 5 9.640 0.6554 0.7847 0.2 5
## 6 11.30 0.5478 0.6153 0.1429 7
Popolo2019_wide <-
Popolo2019 |>
mutate (group = case_match(
group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Popolo2019_est <-
Popolo2019_wide |>
mutate(
analysis_plan =
c("All mental health outcomes",
"All mental health outcomes/Unused outcomes",
"All mental health outcomes"),
study = "Popolo et al. 2019",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
mean_z = (w_t*z_t + w_c*z_c)/(w_t + w_c),
ppcor = (exp(2*mean_z)-1)/(exp(2*mean_z)+1),
ppcor_method = "Calculated from study results",
)|>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# reverting all scores as lower score is beneficial
m_post = (m_post_t - m_post_c) * -1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc, sqrt = TRUE
),
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup() |>
rename(
d_rm_t = within_group_d_t,
d_rm_c = within_group_d_c
); Popolo2019_est
## # A tibble: 3 × 74
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 CORE_OM 8 10 10 10 12.85 15.24 4.6 6.68
## 2 DERS 8 10 10 10 95 100.9 16.19 17.67
## 3 TAS 8 10 10 10 54.2 51.5 11.52 10.99
## m_post_t m_post_c sd_post_t sd_post_c d_rm_t d_rm_c sd_diff_t sd_diff_c r_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 7.68 11.78 1.94 4.59 1.14 0.64 4.535 5.406 0.2441
## 2 76.4 97.11 26.78 29.17 0.74 0.16 25.14 23.69 0.4008
## 3 43.5 52.63 11.7 12.59 1.11 0.1 9.640 11.30 0.6554
## r_c z_t z_c v_t v_c w_t w_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5946 0.2491 0.6848 0.2 0.1429 5 7
## 2 0.5840 0.4245 0.6685 0.2 0.1429 5 7
## 3 0.5478 0.7847 0.6153 0.2 0.1429 5 7
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 All mental health outcomes Popolo et al. 2019 SMD
## 2 All mental health outcomes/Unused outcomes Popolo et al. 2019 SMD
## 3 All mental health outcomes Popolo et al. 2019 SMD
## sd_used main_es_method mean_z ppcor
## <chr> <chr> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5032 0.4647
## 2 Pooled posttest SD Raw diff-in-diffs 0.5669 0.5130
## 3 Pooled posttest SD Raw diff-in-diffs 0.6859 0.5953
## ppcor_method N_total df_ind m_post sd_pool d_post vd_post
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Calculated from study results 18 18 4.1 3.674 1.116 0.2596
## 2 Calculated from study results 18 18 20.71 28.15 0.7357 0.2400
## 3 Calculated from study results 18 18 9.13 12.21 0.7478 0.2405
## Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.225 0.9577 1.069 0.2567 0.225 5.17 3.46 0.4654 0.2469 0.2409
## 2 0.225 0.9577 0.7046 0.2388 0.225 18.6 3.790 0.5261 0.2268 0.2191
## 3 0.225 0.9577 0.7162 0.2392 0.225 10.7 -1.130 0.9690 0.2082 0.1821
## g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <chr> <dbl>
## 1 0.4458 0.2464 0.2409 8 Imputed 0.1 Imputed 1
## 2 0.5039 0.2262 0.2191 8 Imputed 0.1 Imputed 1
## 3 0.9280 0.2060 0.1821 8 Imputed 0.1 Imputed 1
## gamma_sqrt df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.949 16 0.9524 1.009 0.3342 0.3024 0.4207 0.3293 0.3238 0.1843
## 2 0.949 16 0.9524 0.6649 0.3162 0.3024 0.4755 0.3016 0.2945 0.2182
## 3 0.949 16 0.9524 0.6759 0.3167 0.3024 0.8758 0.2687 0.2447 0.4356
## vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 0.0625 16 16 1 eta 1.344 CORE_OM
## 2 0.0625 16 16 1 eta 1.344 DERS
## 3 0.0625 16 16 1 eta 1.344 TAS
Data was extracted from Table 2 (p.6)
# Based on Table 2, p. 6
Rabenstein2015 <-
tibble(
group = rep(c("Intervention", "Control"), each = 1, 3),
outcome = rep(c(
# "Somatization",
# "OCD",
# "Insecurity",
# "Depression",
# "Anxiety",
# "Aggressiveness",
# "Phobic Anxiety",
# "Paranoid Thinking",
# "Psychoticism",
"BSI (GSI)",
"BDI",
"WHOQOL"
# "Physical",
# "Mental",
# "Social Relations",
# "Environment"
), each = 2,1),
N = rep(c(
153, 148
), each = 1, 3),
N_start = rep(c(
170
)),
m_pre = c(
# 8.11, 8.08,
# 9.85, 12.04,
# 5.58, 7.23,
# 9.22, 10.45,
# 7.82, 9.91,
# 4.08, 5.45,
# 5.15, 6.43,
# 5.83, 7.24,
# 4.74, 5.76,
1.23, 1.48,
23.39, 25.04,
40.71, 42.87
# 50.78, 50.35,
# 38.52, 37.9,
# 53.31, 47.49,
# 61.68, 63
),
sd_pre = c(
# 5.51, 5.79,
# 5.45, 5.30,
# 4.04, 3.67,
# 6.08, 5.28,
# 5.09, 5.20,
# 3.61, 3.23,
# 4.92, 4.83,
# 4.35, 4.09,
# 3.72, 3.87,
0.68, 0.66,
10.92, 9.83,
22.38, 21.37
# 19.56, 15.96,
# 19.55, 16.43,
# 24.22, 23.85,
# 18.62, 16.04
),
m_post = c(
# 4.49, 7.15,
# 7.02, 10.25,
# 4.06, 6.63,
# 5.68, 9.87,
# 4.45, 8.59,
# 2.74, 4.15,
# 2.91, 5.59,
# 4.82, 6.25,
# 3.12, 4.93,
0.81, 1.30,
15.24, 22.08,
53.21, 46.1
# 59.43, 52.07,
# 48.45, 38.49,
# 58.23, 50.27,
# 65.83, 65.83
),
sd_post = c(
# 4.46, 5.64,
# 5.16, 5.63,
# 3.53, 4.06,
# 5.18, 5.63,
# 4.36, 5.40,
# 2.45, 3.18,
# 3.67, 4.62,
# 4.26, 4.51,
# 3.25, 3.91,
0.60, 0.67,
10.78, 9.95,
22.83, 20.44
# 21.37, 15.32,
# 19.94, 17.32,
# 23.77, 22.13,
# 18.08, 17.12
),
tval_paired = c(
7.355,3.428,
8.377, 4.018,
-6.695, -1.865
),
r = ((sd_pre^2*tval_paired^2 + sd_post^2*tval_paired^2) -
(m_post-m_pre)^2 * N)/ (2 * sd_pre*sd_post*tval_paired^2),
z = 0.5 * log( (1+r)/(1-r) ),
v = 1/(N-3),
w = 1/v
); Rabenstein2015
## # A tibble: 6 × 13
## group outcome N N_start m_pre sd_pre m_post sd_post tval_paired
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention BSI (GSI) 153 170 1.23 0.68 0.81 0.6 7.355
## 2 Control BSI (GSI) 148 170 1.48 0.66 1.3 0.67 3.428
## 3 Intervention BDI 153 170 23.39 10.92 15.24 10.78 8.377
## 4 Control BDI 148 170 25.04 9.83 22.08 9.95 4.018
## 5 Intervention WHOQOL 153 170 40.71 22.38 53.21 22.83 -6.695
## 6 Control WHOQOL 148 170 42.87 21.37 46.1 20.44 -1.865
## r z v w
## <dbl> <dbl> <dbl> <dbl>
## 1 0.3964 0.4194 0.006667 150
## 2 0.5387 0.6023 0.006897 145
## 3 0.3850 0.4059 0.006667 150
## 4 0.5895 0.6769 0.006897 145
## 5 0.4783 0.5207 0.006667 150
## 6 0.4928 0.5398 0.006897 145
# Making it a wide format:
Rabenstein2015_wide <-
Rabenstein2015 |>
mutate (group = case_match(
group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
# Effect size calculation:
Rabenstein2015_est <-
Rabenstein2015_wide |>
mutate(
analysis_plan =
c("All mental health outcomes",
"All mental health outcomes/Depression",
"Wellbeing and Quality of Life"),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
study = "Rabenstein et al. 2015",
# There are also some effect sizes in the raw text on p. 7
# the time X group effect: ANOVA
# df1 = c(1),
# df2 = c(138, 187, 169),
# F_val = c(25.584, 20.582, 13.252),
# p_val_F = c(0.001, 0.001, 0.001),
# eta_sqrt = c(0.156, 0.002, 0.0073),
# t-test
# t_val = c(-4.468, -4.531,2.146),
# p_val_t = c(0.001, 0.001, 0.012),
# d = c(0.76, 0.66, 0.55)
main_es_method = "Raw diff-in-diffs",
mean_z = (w_t*z_t + w_c*z_c)/(w_t + w_c),
ppcor = (exp(2*mean_z)-1)/(exp(2*mean_z)+1),
ppcor_method = "Calculated from study results, i.e., paired t-tests",
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# The outcome BSI and BDI are reverted because lower score is beneficial
m_post = if_else(outcome %in% c("GSI","BDI"),
(m_post_c - m_post_t)*-1, # Revert the difference if BSI or BDI
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# The outcome BSI and BDI are reverted because lower score is beneficial
m_diff_t = if_else(analysis_plan %in% c("GSI","BDI"),
(m_post_t - m_pre_t)*-1, m_post_t - m_pre_t),
m_diff_c = if_else(analysis_plan %in% c("GSI","BDI"),
(m_post_c - m_pre_c)*-1,m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc, sqrt = TRUE
),
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Rabenstein2015_est
## # A tibble: 3 × 72
## outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BSI (GSI) 153 148 170 170 1.23 1.48 0.68 0.66
## 2 BDI 153 148 170 170 23.39 25.04 10.92 9.83
## 3 WHOQOL 153 148 170 170 40.71 42.87 22.38 21.37
## m_post_t m_post_c sd_post_t sd_post_c tval_paired_t tval_paired_c r_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.81 1.3 0.6 0.67 7.355 3.428 0.3964
## 2 15.24 22.08 10.78 9.95 8.377 4.018 0.3850
## 3 53.21 46.1 22.83 20.44 -6.695 -1.865 0.4783
## r_c z_t z_c v_t v_c w_t w_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.5387 0.4194 0.6023 0.006667 0.006897 150 145
## 2 0.5895 0.4059 0.6769 0.006667 0.006897 150 145
## 3 0.4928 0.5207 0.5398 0.006667 0.006897 150 145
## analysis_plan effect_size sd_used
## <chr> <chr> <chr>
## 1 All mental health outcomes SMD Pooled posttest SD
## 2 All mental health outcomes/Depression SMD Pooled posttest SD
## 3 Wellbeing and Quality of Life SMD Pooled posttest SD
## study main_es_method mean_z ppcor
## <chr> <chr> <dbl> <dbl>
## 1 Rabenstein et al. 2015 Raw diff-in-diffs 0.5093 0.4694
## 2 Rabenstein et al. 2015 Raw diff-in-diffs 0.5391 0.4923
## 3 Rabenstein et al. 2015 Raw diff-in-diffs 0.5301 0.4855
## ppcor_method N_total df_ind m_post
## <chr> <dbl> <dbl> <dbl>
## 1 Calculated from study results, i.e., paired t-tests 301 301 -0.49
## 2 Calculated from study results, i.e., paired t-tests 301 301 -6.84
## 3 Calculated from study results, i.e., paired t-tests 301 301 7.11
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.6354 -0.7712 0.01428 0.01329 0.9975 -0.7693 0.01428 0.01329 -0.42
## 2 10.38 -0.6589 0.01401 0.01329 0.9975 -0.6573 0.01401 0.01329 -8.15
## 3 21.69 0.3278 0.01347 0.01329 0.9975 0.3270 0.01347 0.01329 12.5
## m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.18 -0.3777 0.01434 0.01411 -0.3768 0.01434 0.01411 8
## 2 -2.96 -0.5000 0.01391 0.01350 -0.4987 0.01391 0.01350 8
## 3 3.230 0.4274 0.01398 0.01368 0.4264 0.01398 0.01368 8
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega gt_post
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 0.1 Imputed 1 0.974 287.4 0.9974 -0.7492
## 2 Imputed 0.1 Imputed 1 0.974 287.4 0.9974 -0.6401
## 3 Imputed 0.1 Imputed 1 0.974 287.4 0.9974 0.3185
## vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.01816 0.01719 -0.3669 0.01847 0.01824 -0.1599 0.003480 287.4 287.4
## 2 0.01790 0.01719 -0.4857 0.01786 0.01745 -0.2160 0.003480 287.4 287.4
## 3 0.01736 0.01719 0.4152 0.01799 0.01769 0.1837 0.003480 287.4 287.4
## n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <chr> <dbl> <chr>
## 1 1 eta 1.293 BSI (GSI)
## 2 1 eta 1.293 BDI
## 3 1 eta 1.293 WHOQOL
# Extracting data from table 3 p. 85
Rosenblum2014 <- tibble(
group = as.factor(rep(c(
"Double Trouble in Recovery (DTR)",
"waiting list control group"),
each = 1,5
)),
# sample = rep(c(
# "Total"
# "New York",
# "Michigan"
# ), each = 10,1),
outcome = rep(c(
"Days any alcohol past 30",
"Days heavy alcohol past 30",
"Days any drugs past 30",
"Days any drugs or alcohol past 30",
"Medication Adherence"
# "RQOL (quality of life)c (total scale)" Only measured at follow-up
), each = 2
),
N = c(
rep(c(91,70), each = 1,5) # Total
#rep(c(35, 32), each = 1,5), # New York
#rep(c(56, 38), each = 1,5) # Michigan
),
N_start = c(
rep(c(113,90), each = 1,5) # Total
# rep(c(50, 40), each = 1,5), # New York
# rep(c(50), each = 1,5) # Michigan
),
m_pre = c(
4.5, 6.5,
2.6, 2.1,
6.9, 7.7,
9.3, 11.9,
1.5, 1.5
# 1.9, 3.9,
# 0.3, 0.8,
# 4.2, 7.1,
# 4.7, 9.9,
# 1.4, 1.4,
# 6.1, 8.6,
# 4.0, 3.1,
# 8.6, 8.2,
# 12.2, 13.6,
# 1.6, 1.6
),
sd_pre = c(
8.2, 9.6,
6.1, 5.1,
9.3, 10.4,
10.1, 11.2,
0.5, 0.5
# 4.7, 7.2,
# 1.0, 1.8,
# 6.3, 10.2,
# 6.1, 10.8,
# 0.4, 0.4,
# 9.5, 11.0,
# 7.4, 6.5,
# 10.5, 10.6,
# 11.0, 11.5,
# 0.5, 0.5
),
m_post = c(
3.1, 6.1,
1.1, 2.1,
5.5, 8.0,
6.8, 11.3,
1.4, 1.4
# 2.7, 2.0,
# 1.6, 3.2,
# 0.3, 1.0,
# 3.4, 8.0,
# 4.5, 10.2,
# 1.4, 1.3,
# 3.5, 3.2,
# 4.0, 8.4,
# 1.5, 3.0,
# 6.8, 8.0,
# 8.3, 12.2,
# 1.5, 1.6
# 2.1, 1.0
),
sd_post = c(
6.4, 8.8,
2.8, 6.0,
9.2, 10.6,
9.8, 11.1,
0.4, 0.4
# 1.8, 1.8,
# 4.4, 7.2,
# 1.3, 4.5,
# 7.1, 10.2,
# 7.8, 10.8,
# 0.3, 0.3,
# 1.5, 1.7,
# 7.3, 9.5,
# 3.4, 7.0,
# 10.2, 11.1,
# 10.6, 11.4,
# 0.5, 0.4
# 1.8, 1.3
),
#q = c(
# rep(c(1), each = 1,10), # The baseline equivalent of the dependent variable was used as a covariate, p. 85
# rep(c(2), each = 1, 4), # The baseline variable PTSD diagnosis was added as a covariate to these analyses because it was correlated with study condition and the #outcome variable, p. 85
# rep(c(1), each = 1,2),
# rep(c(2), each = 1,2),
# rep(c(1), each = 1,12)
# )
); Rosenblum2014
## # A tibble: 10 × 8
## group outcome N
## <fct> <chr> <dbl>
## 1 Double Trouble in Recovery (DTR) Days any alcohol past 30 91
## 2 waiting list control group Days any alcohol past 30 70
## 3 Double Trouble in Recovery (DTR) Days heavy alcohol past 30 91
## 4 waiting list control group Days heavy alcohol past 30 70
## 5 Double Trouble in Recovery (DTR) Days any drugs past 30 91
## 6 waiting list control group Days any drugs past 30 70
## 7 Double Trouble in Recovery (DTR) Days any drugs or alcohol past 30 91
## 8 waiting list control group Days any drugs or alcohol past 30 70
## 9 Double Trouble in Recovery (DTR) Medication Adherence 91
## 10 waiting list control group Medication Adherence 70
## N_start m_pre sd_pre m_post sd_post
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 113 4.5 8.2 3.1 6.4
## 2 90 6.5 9.6 6.1 8.8
## 3 113 2.6 6.1 1.1 2.8
## 4 90 2.1 5.1 2.1 6
## 5 113 6.9 9.3 5.5 9.2
## 6 90 7.7 10.4 8 10.6
## 7 113 9.3 10.1 6.8 9.8
## 8 90 11.9 11.2 11.3 11.1
## 9 113 1.5 0.5 1.4 0.4
## 10 90 1.5 0.5 1.4 0.4
Rosenblum2014_wide <-
Rosenblum2014 |>
mutate (group = case_match(
group, "Double Trouble in Recovery (DTR)" ~ "t", "waiting list control group" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Rosenblum2014_est <-
Rosenblum2014_wide |>
mutate(
# p_val = c(0.03, 0.11, 0.07, 0.02, 0.45,
# 0.84, 0.47, 0.07, 0.17, 0.73,
# 0.01, 0.10, 0.31, 0.06, 0.15),
analysis_plan = case_when(
str_detect(outcome, "Days") ~ "Alcohol and drug abuse/misuse",
str_detect(outcome, "Medication Adherence") ~ "Unused outcomes",
.default = NA_character_
),
study = "Rosenblum et al. 2014",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# all scores are reverted because lower scores is beneficial
m_post = (m_post_t - m_post_c)*-1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# all scores are reverted because lower scores is beneficial
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste0(outcome)
) |>
ungroup(); Rosenblum2014_est
## # A tibble: 5 × 61
## outcome N_t N_c N_start_t N_start_c m_pre_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Days any alcohol past 30 91 70 113 90 4.5
## 2 Days heavy alcohol past 30 91 70 113 90 2.6
## 3 Days any drugs past 30 91 70 113 90 6.9
## 4 Days any drugs or alcohol past 30 91 70 113 90 9.3
## 5 Medication Adherence 91 70 113 90 1.5
## m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6.5 8.2 9.6 3.1 6.1 6.4 8.8
## 2 2.1 6.1 5.1 1.1 2.1 2.8 6
## 3 7.7 9.3 10.4 5.5 8 9.2 10.6
## 4 11.9 10.1 11.2 6.8 11.3 9.8 11.1
## 5 1.5 0.5 0.5 1.4 1.4 0.4 0.4
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 Alcohol and drug abuse/misuse Rosenblum et al. 2014 SMD
## 2 Alcohol and drug abuse/misuse Rosenblum et al. 2014 SMD
## 3 Alcohol and drug abuse/misuse Rosenblum et al. 2014 SMD
## 4 Alcohol and drug abuse/misuse Rosenblum et al. 2014 SMD
## 5 Unused outcomes Rosenblum et al. 2014 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind m_post
## <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 161 161 3
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 161 161 1
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 161 161 2.5
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 161 161 4.5
## 5 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 161 161 0
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 7.536 0.3981 0.02577 0.02527 0.9953 0.3962 0.02576 0.02527 1.4 0.4000
## 2 4.479 0.2233 0.02543 0.02527 0.9953 0.2222 0.02543 0.02527 1.5 0
## 3 9.832 0.2543 0.02548 0.02527 0.9953 0.2531 0.02547 0.02527 1.4 -0.3000
## 4 10.38 0.4334 0.02586 0.02527 0.9953 0.4313 0.02585 0.02527 2.5 0.6000
## 5 0.4 0 0.02527 0.02527 0.9953 0 0.02527 0.02527 0.1000 0.1000
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.1327 0.02533 0.02527 0.1321 0.02533 0.02527 8 Imputed 0.1
## 2 0.3349 0.02562 0.02527 0.3333 0.02562 0.02527 8 Imputed 0.1
## 3 0.1729 0.02537 0.02527 0.1721 0.02537 0.02527 8 Imputed 0.1
## 4 0.1830 0.02538 0.02527 0.1821 0.02538 0.02527 8 Imputed 0.1
## 5 0 0.02527 0.02527 0 0.02527 0.02527 8 Imputed 0.1
## icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 1 0.976 152.4 0.9951 0.3866 0.03203 0.03154
## 2 Imputed 1 0.976 152.4 0.9951 0.2168 0.03170 0.03154
## 3 Imputed 1 0.976 152.4 0.9951 0.2469 0.03174 0.03154
## 4 Imputed 1 0.976 152.4 0.9951 0.4209 0.03212 0.03154
## 5 Imputed 1 0.976 152.4 0.9951 0 0.03154 0.03154
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.1289 0.03160 0.03154 0.05875 0.006560 152.4 152.4 1 eta
## 2 0.3253 0.03189 0.03154 0.1481 0.006560 152.4 152.4 1 eta
## 3 0.1679 0.03164 0.03154 0.07654 0.006560 152.4 152.4 1 eta
## 4 0.1777 0.03165 0.03154 0.08099 0.006560 152.4 152.4 1 eta
## 5 0 0.03154 0.03154 0 0.006560 152.4 152.4 1 eta
## adj_value_DD vary_id
## <dbl> <chr>
## 1 1.248 Days any alcohol past 30
## 2 1.248 Days heavy alcohol past 30
## 3 1.248 Days any drugs past 30
## 4 1.248 Days any drugs or alcohol past 30
## 5 1.248 Medication Adherence
# Taken from table
Russinova2018 <- tibble(
group = rep(c("VEP", "Control group"),
each = 1,10),
outcome = rep(c("Empowerment scale",
"ISMI Scale",
"Work Hope Scale",
"Vocational identity",
"Work motivation"),
each = 2, 2),
timing = rep(c(
#" 10 weeks post-baseline",
"Post",
"3m"), each = 10),
N = c(
# 10 weeks post-base
# 23, 25,
# 23, 25,
# 23, 25,
# 23, 24,
# 21, 23,
# Post intervention
22, 26,
22, 26,
22, 26,
22, 26,
21, 24,
# 3m followup
22, 25,
22, 25,
22, 25,
22, 25,
21, 24),
N_start = rep(c(
24, 27,
24, 26,
24, 27,
24, 27,
21, 23
), each = 1,2),
m_pre = rep(c(
2.86, 2.84,
2.11, 2.16,
4.38, 4.16,
7.79, 7.04,
3.09, 2.96),
each = 1,2), # fordi der er tre opfølgningsperioder
sd_pre = rep(c(
.3, .21,
.5, .43,
1.13, .79,
5.02, 5.31,
.59, .47),
each = 1,2),
m_post = c(
# 10 weeks post-base
# 3.02, 2.85,
# 1.93, 2.17,
# 4.63, 4.26,
# 8.61, 6.88,
# 3.11, 2.97,
# Post intervention
2.98, 2.92,
1.86, 2.23,
4.64, 4.29,
9.09, 6.77,
3.15, 3.09,
# 3m followup
2.96, 2.88,
1.92, 2.08,
4.67, 4.58,
9.23, 8.32,
3.17, 3.04
),
sd_post = c(
# 10 weeks post-base
# .34, .21,
# .43, .44,
# 1.21, .96,
# 4.49, 4.48,
# .67, .49,
# Post intervention
.34, .24,
.44, .41,
1.29, 1.15,
5.08, 4.99,
.58, .55,
# 3m followup
.34, .29,
.5, .43,
1.24, .94,
5.05, 5.17,
.6, .5)
); Russinova2018
## # A tibble: 20 × 9
## group outcome timing N N_start m_pre sd_pre m_post
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 VEP Empowerment scale Post 22 24 2.86 0.3 2.98
## 2 Control group Empowerment scale Post 26 27 2.84 0.21 2.92
## 3 VEP ISMI Scale Post 22 24 2.11 0.5 1.86
## 4 Control group ISMI Scale Post 26 26 2.16 0.43 2.23
## 5 VEP Work Hope Scale Post 22 24 4.38 1.13 4.64
## 6 Control group Work Hope Scale Post 26 27 4.16 0.79 4.29
## 7 VEP Vocational identity Post 22 24 7.79 5.02 9.09
## 8 Control group Vocational identity Post 26 27 7.04 5.31 6.77
## 9 VEP Work motivation Post 21 21 3.09 0.59 3.15
## 10 Control group Work motivation Post 24 23 2.96 0.47 3.09
## 11 VEP Empowerment scale 3m 22 24 2.86 0.3 2.96
## 12 Control group Empowerment scale 3m 25 27 2.84 0.21 2.88
## 13 VEP ISMI Scale 3m 22 24 2.11 0.5 1.92
## 14 Control group ISMI Scale 3m 25 26 2.16 0.43 2.08
## 15 VEP Work Hope Scale 3m 22 24 4.38 1.13 4.67
## 16 Control group Work Hope Scale 3m 25 27 4.16 0.79 4.58
## 17 VEP Vocational identity 3m 22 24 7.79 5.02 9.23
## 18 Control group Vocational identity 3m 25 27 7.04 5.31 8.32
## 19 VEP Work motivation 3m 21 21 3.09 0.59 3.17
## 20 Control group Work motivation 3m 24 23 2.96 0.47 3.04
## sd_post
## <dbl>
## 1 0.34
## 2 0.24
## 3 0.44
## 4 0.41
## 5 1.29
## 6 1.15
## 7 5.08
## 8 4.99
## 9 0.58
## 10 0.55
## 11 0.34
## 12 0.29
## 13 0.5
## 14 0.43
## 15 1.24
## 16 0.94
## 17 5.05
## 18 5.17
## 19 0.6
## 20 0.5
# Turning to wideformat
Russinova2018_wide <- Russinova2018 |>
mutate(group = case_match(group, "VEP" ~ "t", "Control group" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Russinova2018_est <- Russinova2018_wide |>
mutate(
# Group effect is estimated across time scores.
# df1 = c(
# rep(c(NA_real_), each = 5,1)
#,
# rep(c(1), each = 5,1)),
# df2 = c(
# rep(c(NA_real_), each = 5,1)
# ,
# c(91,
# 90,
# 92,
# 91,
# 75)),
# F_val = c(
# rep(c(NA_real_), each = 5,1),
# 6.65,
# 5.84,
# 1.39,
# 1.98,
# 0.08
# ),
# p_val_F = c(
# rep(c(NA_real_), each = 5,1),
# 0.01,
# 0.02,
# 0.24,
# 0.16,
# 0.78
# ),
# d = c(
# rep(c(NA_real_), each = 5,1),
# 0.39,
# -0.65,
# 0.32,
# 0.41,
# 0.30
# ),
study = "Russinova et al. 2018",
analysis_plan = case_when(
str_detect(outcome, "Empowerment|Work Hope|Work motivation") ~ "Hope, Empowerment & Self-efficacy",
str_detect(outcome, "ISMI Scale") ~ "Self-esteem",
str_detect(outcome, "Vocational identity") ~ "Employment",
.default = NA_character_
),
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
#
m_post = if_else(!outcome %in% c("ISMI Scale"), m_post_t - m_post_c,
(m_post_t - m_post_c)*-1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# The outcome BSI and BDI are reverted because lower score is beneficial
m_diff_t = if_else(!outcome %in% c("ISMI Scale"),
m_post_t - m_pre_t,(m_post_t - m_pre_t)*-1),
m_diff_c = if_else(!outcome %in% c("ISMI Scale"),
m_post_c - m_pre_c, (m_post_c - m_pre_c)*-1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste0(outcome, "/", timing)
) |>
ungroup(); Russinova2018_est
## # A tibble: 10 × 62
## outcome timing N_t N_c N_start_t N_start_c m_pre_t m_pre_c
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Empowerment scale Post 22 26 24 27 2.86 2.84
## 2 ISMI Scale Post 22 26 24 26 2.11 2.16
## 3 Work Hope Scale Post 22 26 24 27 4.38 4.16
## 4 Vocational identity Post 22 26 24 27 7.79 7.04
## 5 Work motivation Post 21 24 21 23 3.09 2.96
## 6 Empowerment scale 3m 22 25 24 27 2.86 2.84
## 7 ISMI Scale 3m 22 25 24 26 2.11 2.16
## 8 Work Hope Scale 3m 22 25 24 27 4.38 4.16
## 9 Vocational identity 3m 22 25 24 27 7.79 7.04
## 10 Work motivation 3m 21 24 21 23 3.09 2.96
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c study
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.3 0.21 2.98 2.92 0.34 0.24 Russinova et al. 2018
## 2 0.5 0.43 1.86 2.23 0.44 0.41 Russinova et al. 2018
## 3 1.13 0.79 4.64 4.29 1.29 1.15 Russinova et al. 2018
## 4 5.02 5.31 9.09 6.77 5.08 4.99 Russinova et al. 2018
## 5 0.59 0.47 3.15 3.09 0.58 0.55 Russinova et al. 2018
## 6 0.3 0.21 2.96 2.88 0.34 0.29 Russinova et al. 2018
## 7 0.5 0.43 1.92 2.08 0.5 0.43 Russinova et al. 2018
## 8 1.13 0.79 4.67 4.58 1.24 0.94 Russinova et al. 2018
## 9 5.02 5.31 9.23 8.32 5.05 5.17 Russinova et al. 2018
## 10 0.59 0.47 3.17 3.04 0.6 0.5 Russinova et al. 2018
## analysis_plan effect_size sd_used
## <chr> <chr> <chr>
## 1 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 2 Self-esteem SMD Pooled posttest SD
## 3 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 4 Employment SMD Pooled posttest SD
## 5 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 6 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 7 Self-esteem SMD Pooled posttest SD
## 8 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## 9 Employment SMD Pooled posttest SD
## 10 Hope, Empowerment & Self-efficacy SMD Pooled posttest SD
## main_es_method ppcor ppcor_method N_total df_ind m_post sd_pool d_post
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Raw diff-in-diffs 0.5 Imputed 48 48 0.06000 0.2900 0.2069
## 2 Raw diff-in-diffs 0.5 Imputed 48 48 0.37 0.4240 0.8727
## 3 Raw diff-in-diffs 0.5 Imputed 48 48 0.3500 1.216 0.2878
## 4 Raw diff-in-diffs 0.5 Imputed 48 48 2.32 5.031 0.4611
## 5 Raw diff-in-diffs 0.5 Imputed 45 45 0.06000 0.5642 0.1064
## 6 Raw diff-in-diffs 0.5 Imputed 47 47 0.08000 0.3143 0.2545
## 7 Raw diff-in-diffs 0.5 Imputed 47 47 0.1600 0.4640 0.3448
## 8 Raw diff-in-diffs 0.5 Imputed 47 47 0.09000 1.090 0.08254
## 9 Raw diff-in-diffs 0.5 Imputed 47 47 0.91 5.114 0.1779
## 10 Raw diff-in-diffs 0.5 Imputed 45 45 0.1300 0.5488 0.2369
## vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c d_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.08436 0.08392 0.9843 0.2037 0.08435 0.08392 0.1200 0.08000 0.1379
## 2 0.09185 0.08392 0.9843 0.8590 0.09160 0.08392 0.2500 -0.07000 0.7548
## 3 0.08478 0.08392 0.9843 0.2833 0.08475 0.08392 0.2600 0.1300 0.1069
## 4 0.08613 0.08392 0.9843 0.4539 0.08606 0.08392 1.3 -0.2700 0.3120
## 5 0.08941 0.08929 0.9832 0.1046 0.08941 0.08929 0.06000 0.1300 -0.1241
## 6 0.08614 0.08545 0.9840 0.2504 0.08612 0.08545 0.1000 0.04000 0.1909
## 7 0.08672 0.08545 0.9840 0.3393 0.08668 0.08545 0.19 0.08000 0.2371
## 8 0.08553 0.08545 0.9840 0.08122 0.08552 0.08545 0.29 0.42 -0.1192
## 9 0.08579 0.08545 0.9840 0.1751 0.08578 0.08545 1.44 1.28 0.03128
## 10 0.08991 0.08929 0.9832 0.2329 0.08989 0.08929 0.08000 0.08000 0
## vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.08411 0.08392 0.1358 0.08411 0.08392 8 Imputed 0.1
## 2 0.08985 0.08392 0.7429 0.08967 0.08392 8 Imputed 0.1
## 3 0.08404 0.08392 0.1052 0.08403 0.08392 8 Imputed 0.1
## 4 0.08493 0.08392 0.3071 0.08490 0.08392 8 Imputed 0.1
## 5 0.08946 0.08929 -0.1220 0.08945 0.08929 8 Imputed 0.1
## 6 0.08584 0.08545 0.1878 0.08583 0.08545 8 Imputed 0.1
## 7 0.08605 0.08545 0.2333 0.08603 0.08545 8 Imputed 0.1
## 8 0.08561 0.08545 -0.1173 0.08560 0.08545 8 Imputed 0.1
## 9 0.08546 0.08545 0.03078 0.08546 0.08545 8 Imputed 0.1
## 10 0.08929 0.08929 0 0.08929 0.08929 8 Imputed 0.1
## icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 1 0.965 44.79 0.9832 0.1963 0.1123 0.1119
## 2 Imputed 1 0.965 44.79 0.9832 0.8280 0.1195 0.1119
## 3 Imputed 1 0.965 44.79 0.9832 0.2731 0.1127 0.1119
## 4 Imputed 1 0.965 44.79 0.9832 0.4375 0.1140 0.1119
## 5 Imputed 1 0.964 41.87 0.9820 0.1007 0.1186 0.1185
## 6 Imputed 1 0.965 43.79 0.9828 0.2414 0.1140 0.1133
## 7 Imputed 1 0.965 43.79 0.9828 0.3270 0.1145 0.1133
## 8 Imputed 1 0.965 43.79 0.9828 0.07828 0.1134 0.1133
## 9 Imputed 1 0.965 43.79 0.9828 0.1687 0.1136 0.1133
## 10 Imputed 1 0.964 41.87 0.9820 0.2242 0.1191 0.1185
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1309 0.1121 0.1119 0.05845 0.02233 44.79 44.79 1
## 2 0.7161 0.1176 0.1119 0.3173 0.02233 44.79 44.79 1
## 3 0.1014 0.1120 0.1119 0.04531 0.02233 44.79 44.79 1
## 4 0.2961 0.1128 0.1119 0.1321 0.02233 44.79 44.79 1
## 5 -0.1175 0.1186 0.1185 -0.05272 0.02388 41.87 41.87 1
## 6 0.1810 0.1137 0.1133 0.08122 0.02284 43.79 43.79 1
## 7 0.2248 0.1139 0.1133 0.1009 0.02284 43.79 43.79 1
## 8 -0.1131 0.1135 0.1133 -0.05075 0.02284 43.79 43.79 1
## 9 0.02967 0.1133 0.1133 0.01332 0.02284 43.79 43.79 1
## 10 0 0.1185 0.1185 0 0.02388 41.87 41.87 1
## adj_fct_DD adj_value_DD vary_id
## <chr> <dbl> <chr>
## 1 eta 1.333 Empowerment scale/Post
## 2 eta 1.333 ISMI Scale/Post
## 3 eta 1.333 Work Hope Scale/Post
## 4 eta 1.333 Vocational identity/Post
## 5 eta 1.327 Work motivation/Post
## 6 eta 1.326 Empowerment scale/3m
## 7 eta 1.326 ISMI Scale/3m
## 8 eta 1.326 Work Hope Scale/3m
## 9 eta 1.326 Vocational identity/3m
## 10 eta 1.327 Work motivation/3m
Data was extracted from Table 1 (p. 35). NOTE: We suspect that the reported F values from ANCOVA for Job-search and Help-seeking at Time-3 (T3) are prone to error. Since they seem to be too small compared with the reported change score differences. Thus, we did not use these values for sampling variance estimation of the corresponding effect sizes.
# Data from Table 1 containing means and standard deviation on page 335
# The table also contains partial η2 values, p-values and F-test
Rüsch2019 <-
tibble(
group = rep(c("Intervention",
"Control"),
each = 1,12),
timing = rep(c("6w",
"6 months"),
each = 12,1),
outcome = rep(c("Job_search",
"Help_seeking",
"SISR",
"SSMIS_SF",
"CES-D",
"BHS"
# "Secrecy"
),
each = 2,2 ),
N = c(rep(c(
18, 17), # 6 weeks
times = 6),
rep(c(
20, 13), # 12 months
times = 6)),
N_start = rep(c(
23, 19
), each = 1,12),
m_pre = rep(c(
3.1, 3.3, # Job-search self-efficacy (1–5)
3.4, 3.0, # Help-seeking intentions (1–7)
15.3, 16.3, # Recovery (SISR: 4–24)
17.3, 17.3, # Self-stigma (SSMIS-SF: 5–45)
39.2, 41.4, # Depressive symptoms (CES-D: 15–60)
14.9, 14.1 # Hopelessness (BHS: 4–24)
# 4.0, 3.7 # Link’s 5-item Secrecy Scale
), each = 1,2),
sd_pre = rep(c(
0.8, 0.8,
1, 1,
4.1, 4.2,
4.3, 8.1,
7.4, 7.2,
3.6, 4.5
# 1.2, 1.6
), each = 1,2),
m_post = c(
# 3 Weeks
# 3.2, 3.2,
# 3.6, 3,
# 16.1, 15.9,
# 15.3, 16.9,
# 35.2, 39.1,
# 13.8, 13.7,
# 3.8, 3.7
# 6 weeks
3.4, 3.3,
3.5, 3.2,
17.8, 16.1,
14.6, 19.1,
31.5, 40.1,
12.6, 14.2,
# 3.5, 3.9,
# 6 months
3.2, 3.2,
3.3, 3.1,
17.3, 15.7,
15.4, 18.3,
32, 37.5,
12.3, 14.4
# 3.7, 4.4
),
sd_post = c(
# 3 weeks
# 0.7, 0.9,
# 1, 0.9,
# 4.2, 3.6,
# 6.2, 8,
# 8.8, 10.2,
# 3.9, 4.6,
# 1, 1.7
# 6 weeks
0.8, 0.9,
1, 1,
3.4, 4.4,
7.9, 8.7,
8.5, 10.1,
3.6, 5,
# 1.3, 1.7,
# 6 months
1, 0.9,
0.6, 0.9,
3.5, 2.6,
7, 9.6,
7.6, 9.8,
4.2, 3
# 0.9, 1.4
)
); Rüsch2019
## # A tibble: 24 × 9
## group timing outcome N N_start m_pre sd_pre m_post sd_post
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Intervention 6w Job_search 18 23 3.1 0.8 3.4 0.8
## 2 Control 6w Job_search 17 19 3.3 0.8 3.3 0.9
## 3 Intervention 6w Help_seeking 18 23 3.4 1 3.5 1
## 4 Control 6w Help_seeking 17 19 3 1 3.2 1
## 5 Intervention 6w SISR 18 23 15.3 4.1 17.8 3.4
## 6 Control 6w SISR 17 19 16.3 4.2 16.1 4.4
## 7 Intervention 6w SSMIS_SF 18 23 17.3 4.3 14.6 7.9
## 8 Control 6w SSMIS_SF 17 19 17.3 8.1 19.1 8.7
## 9 Intervention 6w CES-D 18 23 39.2 7.4 31.5 8.5
## 10 Control 6w CES-D 17 19 41.4 7.2 40.1 10.1
## 11 Intervention 6w BHS 18 23 14.9 3.6 12.6 3.6
## 12 Control 6w BHS 17 19 14.1 4.5 14.2 5
## 13 Intervention 6 months Job_search 20 23 3.1 0.8 3.2 1
## 14 Control 6 months Job_search 13 19 3.3 0.8 3.2 0.9
## 15 Intervention 6 months Help_seeking 20 23 3.4 1 3.3 0.6
## 16 Control 6 months Help_seeking 13 19 3 1 3.1 0.9
## 17 Intervention 6 months SISR 20 23 15.3 4.1 17.3 3.5
## 18 Control 6 months SISR 13 19 16.3 4.2 15.7 2.6
## 19 Intervention 6 months SSMIS_SF 20 23 17.3 4.3 15.4 7
## 20 Control 6 months SSMIS_SF 13 19 17.3 8.1 18.3 9.6
## 21 Intervention 6 months CES-D 20 23 39.2 7.4 32 7.6
## 22 Control 6 months CES-D 13 19 41.4 7.2 37.5 9.8
## 23 Intervention 6 months BHS 20 23 14.9 3.6 12.3 4.2
## 24 Control 6 months BHS 13 19 14.1 4.5 14.4 3
# Turning data into wide format
Rüsch2019_wide <- Rüsch2019 |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
)
Rüsch2019_est <-
Rüsch2019_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "CES-D") ~ "All mental health outcomes/Depression",
str_detect(outcome, "Job_search|Help_seeking|BHS|SISR") ~ "Hope, Empowerment & Self-efficacy",
str_detect(outcome, "SSMIS_SF") ~ "Self-esteem",
.default = NA_character_
),
# ANCOVA estimates taken from table 1, p. 335
F_val = c(
# 12 weeks
1.4, 0.2, 4.6, 10.8, 6.3, 3.4,
# 6 months
0.01, 0.04, 1.9, 1.5, 0.9, 2.4
),
#eta_sqrt = c(
# 12 weeks
# 0.04, 0.007, 0.13, 0.25, 0.17, 0.10,
# 6 months
# 0.01, 0.01, 0.06, 0.05, 0.03, 0.07
#),
#p_val_f = c(
# 12 weeks
# 0.24, 0.64, 0.039, 0.08, 0.17, 0.08,
# 6 months
# 0.96, 0.85, 0.17, 0.23, 0.35, 0.14
study = "Rüsch et al. 2019"
) |>
# arrange(outcome, desc(timing)) |>
rowwise() |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
ppcor = if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
ppcor_imp,
NA_real_
),
ppcor_method = if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
"Imputed - We did not trust the reported F values",
"F values from ANCOVA was used for variance estimation"
),
m_post = case_when(
outcome %in% c("Job_search", "Help_seeking", "SISR") ~ (m_post_t - m_post_c), # Higher is beneficial
outcome %in% c("SSMIS_SF", "CES-D", "BHS") ~ (m_post_t - m_post_c) * -1), # Lower is beneficial
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# The outcome BSI and BDI are reverted because lower score is beneficial
m_diff_t = case_when(
outcome %in% c("Job_search", "Help_seeking", "SISR") ~ (m_post_t - m_pre_t), # Higher is beneficial
outcome %in% c("SSMIS_SF", "CES-D", "BHS") ~ (m_post_t - m_pre_t)*-1 # Lower is beneficial
),
m_diff_c = case_when(
outcome %in% c("Job_search", "Help_seeking", "SISR") ~ (m_post_c - m_pre_c), # Higher is beneficial
outcome %in% c("SSMIS_SF", "CES-D", "BHS") ~ (m_post_c - m_pre_c)*-1 # Lower is beneficial
),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
d_DD^2/F_val + d_DD^2/(2*df_ind)
),
Wd_DD = if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
2*(1-ppcor) * (1/N_t + 1/N_c),
d_DD^2/F_val
),
g_DD = J * d_DD,
vg_DD = if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
g_DD^2/F_val + g_DD^2/(2*df_ind)
),
Wg_DD = if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD^2/F_val
)
) |>
rowwise() |>
mutate(
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
if_else(
timing == "12w" & str_detect(outcome, "Help|Job"),
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
)
),
vary_id = paste0(outcome, "/", timing)
) |>
ungroup(); Rüsch2019_est
## # A tibble: 12 × 63
## timing outcome N_t N_c N_start_t N_start_c m_pre_t m_pre_c
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 6w Job_search 18 17 23 19 3.1 3.3
## 2 6w Help_seeking 18 17 23 19 3.4 3
## 3 6w SISR 18 17 23 19 15.3 16.3
## 4 6w SSMIS_SF 18 17 23 19 17.3 17.3
## 5 6w CES-D 18 17 23 19 39.2 41.4
## 6 6w BHS 18 17 23 19 14.9 14.1
## 7 6 months Job_search 20 13 23 19 3.1 3.3
## 8 6 months Help_seeking 20 13 23 19 3.4 3
## 9 6 months SISR 20 13 23 19 15.3 16.3
## 10 6 months SSMIS_SF 20 13 23 19 17.3 17.3
## 11 6 months CES-D 20 13 23 19 39.2 41.4
## 12 6 months BHS 20 13 23 19 14.9 14.1
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.8 0.8 3.4 3.3 0.8 0.9
## 2 1 1 3.5 3.2 1 1
## 3 4.1 4.2 17.8 16.1 3.4 4.4
## 4 4.3 8.1 14.6 19.1 7.9 8.7
## 5 7.4 7.2 31.5 40.1 8.5 10.1
## 6 3.6 4.5 12.6 14.2 3.6 5
## 7 0.8 0.8 3.2 3.2 1 0.9
## 8 1 1 3.3 3.1 0.6 0.9
## 9 4.1 4.2 17.3 15.7 3.5 2.6
## 10 4.3 8.1 15.4 18.3 7 9.6
## 11 7.4 7.2 32 37.5 7.6 9.8
## 12 3.6 4.5 12.3 14.4 4.2 3
## analysis_plan F_val study N_total df_ind
## <chr> <dbl> <chr> <dbl> <dbl>
## 1 Hope, Empowerment & Self-efficacy 1.4 Rüsch et al. 2019 35 35
## 2 Hope, Empowerment & Self-efficacy 0.2 Rüsch et al. 2019 35 35
## 3 Hope, Empowerment & Self-efficacy 4.6 Rüsch et al. 2019 35 35
## 4 Self-esteem 10.8 Rüsch et al. 2019 35 35
## 5 All mental health outcomes/Depression 6.3 Rüsch et al. 2019 35 35
## 6 Hope, Empowerment & Self-efficacy 3.4 Rüsch et al. 2019 35 35
## 7 Hope, Empowerment & Self-efficacy 0.01 Rüsch et al. 2019 33 33
## 8 Hope, Empowerment & Self-efficacy 0.04 Rüsch et al. 2019 33 33
## 9 Hope, Empowerment & Self-efficacy 1.9 Rüsch et al. 2019 33 33
## 10 Self-esteem 1.5 Rüsch et al. 2019 33 33
## 11 All mental health outcomes/Depression 0.9 Rüsch et al. 2019 33 33
## 12 Hope, Empowerment & Self-efficacy 2.4 Rüsch et al. 2019 33 33
## effect_size sd_used main_es_method ppcor
## <chr> <chr> <chr> <dbl>
## 1 SMD Pooled posttest SD Raw diff-in-diffs NA
## 2 SMD Pooled posttest SD Raw diff-in-diffs NA
## 3 SMD Pooled posttest SD Raw diff-in-diffs NA
## 4 SMD Pooled posttest SD Raw diff-in-diffs NA
## 5 SMD Pooled posttest SD Raw diff-in-diffs NA
## 6 SMD Pooled posttest SD Raw diff-in-diffs NA
## 7 SMD Pooled posttest SD Raw diff-in-diffs NA
## 8 SMD Pooled posttest SD Raw diff-in-diffs NA
## 9 SMD Pooled posttest SD Raw diff-in-diffs NA
## 10 SMD Pooled posttest SD Raw diff-in-diffs NA
## 11 SMD Pooled posttest SD Raw diff-in-diffs NA
## 12 SMD Pooled posttest SD Raw diff-in-diffs NA
## ppcor_method m_post sd_pool d_post
## <chr> <dbl> <dbl> <dbl>
## 1 F values from ANCOVA was used for variance estimation 0.1000 0.8500 0.1177
## 2 F values from ANCOVA was used for variance estimation 0.3000 1 0.3000
## 3 F values from ANCOVA was used for variance estimation 1.7 3.917 0.4340
## 4 F values from ANCOVA was used for variance estimation 4.5 8.298 0.5423
## 5 F values from ANCOVA was used for variance estimation 8.6 9.310 0.9237
## 6 F values from ANCOVA was used for variance estimation 1.6 4.336 0.3690
## 7 F values from ANCOVA was used for variance estimation 0 0.9625 0
## 8 F values from ANCOVA was used for variance estimation 0.2000 0.7309 0.2736
## 9 F values from ANCOVA was used for variance estimation 1.600 3.182 0.5028
## 10 F values from ANCOVA was used for variance estimation 2.9 8.106 0.3578
## 11 F values from ANCOVA was used for variance estimation 5.5 8.519 0.6456
## 12 F values from ANCOVA was used for variance estimation 2.1 3.781 0.5554
## vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c d_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1146 0.1144 0.9784 0.1151 0.1146 0.1144 0.3000 0 0.3530
## 2 0.1157 0.1144 0.9784 0.2935 0.1156 0.1144 0.1000 0.2000 -0.1000
## 3 0.1171 0.1144 0.9784 0.4247 0.1170 0.1144 2.5 -0.2000 0.6893
## 4 0.1186 0.1144 0.9784 0.5306 0.1184 0.1144 2.7 -1.8 0.5423
## 5 0.1266 0.1144 0.9784 0.9038 0.1260 0.1144 7.7 1.300 0.6874
## 6 0.1163 0.1144 0.9784 0.3611 0.1162 0.1144 2.3 -0.1000 0.5536
## 7 0.1269 0.1269 0.9771 0 0.1269 0.1269 0.1000 -0.1000 0.2078
## 8 0.1281 0.1269 0.9771 0.2674 0.1280 0.1269 -0.1000 0.1000 -0.2736
## 9 0.1308 0.1269 0.9771 0.4913 0.1306 0.1269 2 -0.6000 0.8171
## 10 0.1289 0.1269 0.9771 0.3496 0.1288 0.1269 1.9 -1 0.3578
## 11 0.1332 0.1269 0.9771 0.6308 0.1330 0.1269 7.2 3.9 0.3874
## 12 0.1316 0.1269 0.9771 0.5427 0.1314 0.1269 2.6 -0.3000 0.7670
## vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.09077 0.08899 0.3453 0.08689 0.08519 8 Imputed 0.1
## 2 0.05014 0.05000 -0.09784 0.04800 0.04787 8 Imputed 0.1
## 3 0.1101 0.1033 0.6744 0.1054 0.09889 8 Imputed 0.1
## 4 0.03144 0.02723 0.5306 0.03009 0.02607 8 Imputed 0.1
## 5 0.08176 0.07501 0.6726 0.07827 0.07180 8 Imputed 0.1
## 6 0.09450 0.09012 0.5416 0.09047 0.08628 8 Imputed 0.1
## 7 4.318 4.318 0.2030 4.123 4.122 8 Imputed 0.1
## 8 1.873 1.872 -0.2674 1.788 1.787 8 Imputed 0.1
## 9 0.3615 0.3514 0.7984 0.3452 0.3355 8 Imputed 0.1
## 10 0.08727 0.08533 0.3496 0.08332 0.08146 8 Imputed 0.1
## 11 0.1690 0.1667 0.3785 0.1613 0.1592 8 Imputed 0.1
## 12 0.2540 0.2451 0.7494 0.2425 0.2340 8 Imputed 0.1
## icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 1 0.965 32.13 0.9765 0.1109 0.1476 0.1474
## 2 Imputed 1 0.965 32.13 0.9765 0.2827 0.1487 0.1474
## 3 Imputed 1 0.965 32.13 0.9765 0.4090 0.1500 0.1474
## 4 Imputed 1 0.965 32.13 0.9765 0.5110 0.1515 0.1474
## 5 Imputed 1 0.965 32.13 0.9765 0.8704 0.1592 0.1474
## 6 Imputed 1 0.965 32.13 0.9765 0.3477 0.1493 0.1474
## 7 Imputed 1 0.969 30 0.9748 0 0.1542 0.1542
## 8 Imputed 1 0.969 30 0.9748 0.2585 0.1553 0.1542
## 9 Imputed 1 0.969 30 0.9748 0.4750 0.1580 0.1542
## 10 Imputed 1 0.969 30 0.9748 0.3379 0.1561 0.1542
## 11 Imputed 1 0.969 30 0.9748 0.6098 0.1604 0.1542
## 12 Imputed 1 0.969 30 0.9748 0.5246 0.1588 0.1542
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.3326 0.1036 0.1018 0.1833 0.03112 32.13 32.13 1
## 2 -0.09423 0.05736 0.05723 -0.06946 0.03112 32.13 32.13 1
## 3 0.6496 0.1248 0.1182 0.3303 0.03112 32.13 32.13 1
## 4 0.5110 0.03523 0.03117 0.5002 0.03112 32.13 32.13 1
## 5 0.6478 0.09238 0.08585 0.3852 0.03112 32.13 32.13 1
## 6 0.5216 0.1074 0.1032 0.2846 0.03112 32.13 32.13 1
## 7 0.1963 4.681 4.680 0.01656 0.03333 30 30 1
## 8 -0.2585 2.030 2.029 -0.03312 0.03333 30 30 1
## 9 0.7718 0.3909 0.3809 0.2273 0.03333 30 30 1
## 10 0.3379 0.09440 0.09250 0.2022 0.03333 30 30 1
## 11 0.3659 0.1830 0.1807 0.1568 0.03333 30 30 1
## 12 0.7245 0.2745 0.2657 0.2552 0.03333 30 30 1
## adj_fct_DD adj_value_DD vary_id
## <chr> <dbl> <chr>
## 1 eta 1.289 Job_search/6w
## 2 eta 1.289 Help_seeking/6w
## 3 eta 1.289 SISR/6w
## 4 eta 1.289 SSMIS_SF/6w
## 5 eta 1.289 CES-D/6w
## 6 eta 1.289 BHS/6w
## 7 eta 1.215 Job_search/6 months
## 8 eta 1.215 Help_seeking/6 months
## 9 eta 1.215 SISR/6 months
## 10 eta 1.215 SSMIS_SF/6 months
## 11 eta 1.215 CES-D/6 months
## 12 eta 1.215 BHS/6 months
# This study makes estimations based on two different analysis based on their
# propensity scores (what i read as the level of control) - i will keep them
# in the same tibble - "sample" indicates different propensity category.
#Extracted from table 4 p. 1682 and only means plus standard deviation is taken.
Sacks2011 <- tibble(
group = rep(c("Intervention",
"Control"),
each = 1,10),
outcome = rep(c(
# "alcohol_intoxication",
# "drug_use",
"BDI_total",
"GSI_total",
"SF-36_mental_health",
"SF-36_social_functioning",
# "Health_rating",
"SF-36_physical_health"
), each = 2,2),
sample = rep(c("low/medium propensity",
"high propensity"), each = 10,1),
N = rep(c(42,34),
each = 10,1),
m_pre = c(# Low/medium propensity
# 6.8, 6.5, # alcohol
# 12.9, 17.8, # drugs
16.1, 18.9, # BDI
45.3, 47.7, # GSI
42.4, 37.6, # SF-36 mental
46.6, 38.5, # SF-36 social functioning
# 3.0, 3.0, # Health rating
44.9, 47.2, # SF-36 physical health
# High propensity
# 6.3, 7.5, # alcohol
# 15.9, 8.3, # drugs
15.3, 15.3, # BDI
42.0, 41.8, # GSI
43.5, 43.1, # SF-36 mental
13.2, 43.6, # SF-36 social functioning
# 3.0, 3.5, # Health rating
42.0, 42.6 # SF-36 physical health
),
sd_pre = c(# Low/medium propensity
# 2.4, 2.2, # alcohol
# 7.2, 8.7, # drugs
6.7, 10.0, # BDI
4.0, 9.0, # GSI# SF-36 mental
11.8, 13.0, # SF-36 mental
11.3, 13.7, # SF-36 social functioning
# 1.2, 1.1, # Health rating
9.0, 10.3, # SF-36 physical health
# High propensity
# 2.3, 0.7, # alcohol
# 7.5, 5.7, # drugs
3.7, 11.9, # BDI
10.3, 7.4, # GSI
10.4, 9.1, # SF-36 mental
13.9, 11.3, # SF-36 social functioning
# 1.0, 0.6, # Health rating
10.4, 14.0), # SF-36 physical health
m_post = c(
# Low/medium propensity
# 2.7, 0.6, # alcohol
# 0.6, 2.1, # drugs
13.1, 8.2, # BDI
38.6, 36.4, # GSI
46.5, 47.2, # SF-36 mental
44.9, 46.5, # SF-36 social functioning
# 2.9, 3.0, # Health rating
45.5, 47.6, # SF-36 physical health
# High propensity
# 0.4, 1.0, # alcohol
# 0.4, 1.3, # drugs
10.0, 16.5, # BDI
39.0, 42.3, # GSI
49.5, 41.6, # SF-36 mental
47.5, 46.3, # SF-36 social functioning
# 3.1, 4.3, # Health rating
42.8, 48.8 # SF-36 physical health
),
sd_post = c(
# Low/medium propensity
# 2.1, 1.8, # alcohol
# 1.9, 4.7, # drugs
11.9, 6.6, # BDI
9.2, 10.1, # GSI
14.2, 13.7, # SF-36 mental
12.6, 11.5, # SF-36 social functioning
# 1.2, 1.0, # Health rating
7.3, 10.1, # SF-36 physical health
# High propensity
# 1.1, 1.4, # alcohol# drugs
# 0.9, 1.9, # drugs
10.9, 8.4, # BDI
7.7, 5.9, # GSI
11.1, 13.2, # SF-36 mental
12.0, 7.7, # SF-36 social functioning
# 1.0, 0.5, # Health rating
12.9, 6.6 # SF-36 physical health
)
); Sacks2011
## # A tibble: 20 × 8
## group outcome sample N m_pre
## <chr> <chr> <chr> <dbl> <dbl>
## 1 Intervention BDI_total low/medium propensity 42 16.1
## 2 Control BDI_total low/medium propensity 42 18.9
## 3 Intervention GSI_total low/medium propensity 42 45.3
## 4 Control GSI_total low/medium propensity 42 47.7
## 5 Intervention SF-36_mental_health low/medium propensity 42 42.4
## 6 Control SF-36_mental_health low/medium propensity 42 37.6
## 7 Intervention SF-36_social_functioning low/medium propensity 42 46.6
## 8 Control SF-36_social_functioning low/medium propensity 42 38.5
## 9 Intervention SF-36_physical_health low/medium propensity 42 44.9
## 10 Control SF-36_physical_health low/medium propensity 42 47.2
## 11 Intervention BDI_total high propensity 34 15.3
## 12 Control BDI_total high propensity 34 15.3
## 13 Intervention GSI_total high propensity 34 42
## 14 Control GSI_total high propensity 34 41.8
## 15 Intervention SF-36_mental_health high propensity 34 43.5
## 16 Control SF-36_mental_health high propensity 34 43.1
## 17 Intervention SF-36_social_functioning high propensity 34 13.2
## 18 Control SF-36_social_functioning high propensity 34 43.6
## 19 Intervention SF-36_physical_health high propensity 34 42
## 20 Control SF-36_physical_health high propensity 34 42.6
## sd_pre m_post sd_post
## <dbl> <dbl> <dbl>
## 1 6.7 13.1 11.9
## 2 10 8.2 6.6
## 3 4 38.6 9.2
## 4 9 36.4 10.1
## 5 11.8 46.5 14.2
## 6 13 47.2 13.7
## 7 11.3 44.9 12.6
## 8 13.7 46.5 11.5
## 9 9 45.5 7.3
## 10 10.3 47.6 10.1
## 11 3.7 10 10.9
## 12 11.9 16.5 8.4
## 13 10.3 39 7.7
## 14 7.4 42.3 5.9
## 15 10.4 49.5 11.1
## 16 9.1 41.6 13.2
## 17 13.9 47.5 12
## 18 11.3 46.3 7.7
## 19 10.4 42.8 12.9
## 20 14 48.8 6.6
# Aggregate pretest measure
Sacks2011_prescores <-
Sacks2011 |>
select(-c(m_post:sd_post)) |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
metafor::escalc(
measure = "SMD",
m1i=m_pre_t, m2i=m_pre_c,
sd1i=sd_pre_t, sd2i=sd_pre_c,
n1i = N_t, n2i = N_c,
data = _
)
Sack_pre_pooled <-
metafor::aggregate.escalc(Sacks2011_prescores, cluster = outcome, struct = "ID", addk = TRUE) |>
select(-c(yi:vi)) |>
mutate(sample = "low/medium propensity and high propensity sample")
# Aggregate posttest measure
Sacks2011_postscores <-
Sacks2011 |>
select(-c(m_pre:sd_pre)) |>
mutate(group = case_match(group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N:last_col()
) |>
metafor::escalc(
measure = "SMD",
m1i=m_post_t, m2i=m_post_c,
sd1i=sd_post_t, sd2i=sd_post_c,
n1i = N_t, n2i = N_c,
data = _
)
Sack_post_pooled <-
metafor::aggregate.escalc(Sacks2011_postscores, cluster = outcome, struct = "ID", addk = TRUE) |>
select(-c(yi:vi)) |>
mutate(sample = "low/medium propensity and high propensity sample")
Sack2011_pooled <- left_join(Sack_pre_pooled, Sack_post_pooled, by = join_by(outcome, sample, N_t, N_c, ki))
Sacks2011_est <-
Sack2011_pooled |>
mutate(
analysis_plan = case_when(
outcome == "BDI_total" ~ "All mental health outcomes/Depression",
outcome == "GSI_total" ~ "All mental health outcomes",
str_detect(outcome, "SF-36") ~ "Wellbeing and Quality of Life"),
study = "Sacks et al. 2011",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
arrange(sample, outcome)|>
mutate(
N_start_t = N_t,
N_start_c = N_c,
N_total = N_t + N_c,
df_ind = N_total,
# For GSI and BDI lower scores are beneficial why these are reverted
m_post = if_else(!outcome %in% c("BDI_total", "GSI_total"), m_post_t - m_post_c,
(m_post_t - m_post_c)*-1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For GSI and BDI lower scores are beneficial why these are reverted
m_diff_t = if_else(!outcome %in% c("BDI_total", "GSI_total"), m_post_t - m_pre_t, (m_post_t - m_pre_t)*-1),
m_diff_c = if_else(!outcome %in% c("BDI_total", "GSI_total"), m_post_c - m_pre_c,(m_post_c - m_pre_c)*-1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Group sizes are imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste0(outcome, "/", sample)) |>
ungroup(); Sacks2011_est
## # A tibble: 5 × 63
## outcome sample
## <chr> <chr>
## 1 BDI_total low/medium propensity and high propensity sample
## 2 GSI_total low/medium propensity and high propensity sample
## 3 SF-36_mental_health low/medium propensity and high propensity sample
## 4 SF-36_physical_health low/medium propensity and high propensity sample
## 5 SF-36_social_functioning low/medium propensity and high propensity sample
## N_t N_c m_pre_t m_pre_c sd_pre_t sd_pre_c ki m_post_t m_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <dbl> <dbl>
## 1 38 38 15.7 17.1 5.2 10.95 2 11.55 12.35
## 2 38 38 43.65 44.75 7.15 8.2 2 38.8 39.35
## 3 38 38 42.95 40.35 11.1 11.05 2 48 44.4
## 4 38 38 43.45 44.9 9.7 12.15 2 44.15 48.2
## 5 38 38 29.9 41.05 12.6 12.5 2 46.2 46.4
## sd_post_t sd_post_c analysis_plan study
## <dbl> <dbl> <chr> <chr>
## 1 11.4 7.5 All mental health outcomes/Depression Sacks et al. 2011
## 2 8.45 8 All mental health outcomes Sacks et al. 2011
## 3 12.65 13.45 Wellbeing and Quality of Life Sacks et al. 2011
## 4 10.1 8.35 Wellbeing and Quality of Life Sacks et al. 2011
## 5 12.3 9.6 Wellbeing and Quality of Life Sacks et al. 2011
## effect_size sd_used main_es_method ppcor ppcor_method N_start_t
## <chr> <chr> <chr> <dbl> <chr> <dbl>
## 1 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 38
## 2 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 38
## 3 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 38
## 4 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 38
## 5 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 38
## N_start_c N_total df_ind m_post sd_pool d_post vd_post Wd_post J
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 38 76 76 0.8000 9.649 0.08291 0.05268 0.05263 0.9901
## 2 38 76 76 0.5500 8.228 0.06684 0.05266 0.05263 0.9901
## 3 38 76 76 3.600 13.06 0.2757 0.05313 0.05263 0.9901
## 4 38 76 76 -4.050 9.266 -0.4371 0.05389 0.05263 0.9901
## 5 38 76 76 -0.2000 11.03 -0.01813 0.05263 0.05263 0.9901
## g_post vg_post Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.08209 0.05268 0.05263 4.15 4.75 -0.06218 0.05266 0.05263 -0.06157
## 2 0.06618 0.05266 0.05263 4.85 5.400 -0.06684 0.05266 0.05263 -0.06618
## 3 0.2730 0.05312 0.05263 5.050 4.050 0.07659 0.05267 0.05263 0.07583
## 4 -0.4327 0.05386 0.05263 0.7000 3.300 -0.2806 0.05315 0.05263 -0.2778
## 5 -0.01795 0.05263 0.05263 16.3 5.35 0.9925 0.05911 0.05263 0.9827
## vg_DD Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt
## <dbl> <dbl> <dbl> <chr> <dbl> <chr> <dbl> <dbl>
## 1 0.05266 0.05263 8 Imputed 0.1 Imputed 1 0.97
## 2 0.05266 0.05263 8 Imputed 0.1 Imputed 1 0.97
## 3 0.05267 0.05263 8 Imputed 0.1 Imputed 1 0.97
## 4 0.05314 0.05263 8 Imputed 0.1 Imputed 1 0.97
## 5 0.05898 0.05263 8 Imputed 0.1 Imputed 1 0.97
## df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 71.51 0.9895 0.07958 0.06847 0.06842 -0.05968 0.06845 0.06842 -0.02698
## 2 71.51 0.9895 0.06416 0.06845 0.06842 -0.06416 0.06845 0.06842 -0.02900
## 3 71.51 0.9895 0.2646 0.06891 0.06842 0.07351 0.06846 0.06842 0.03323
## 4 71.51 0.9895 -0.4195 0.06965 0.06842 -0.2693 0.06893 0.06842 -0.1216
## 5 71.51 0.9895 -0.01740 0.06842 0.06842 0.9526 0.07477 0.06842 0.4243
## vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.01398 71.51 71.51 1 eta 1.3
## 2 0.01398 71.51 71.51 1 eta 1.3
## 3 0.01398 71.51 71.51 1 eta 1.3
## 4 0.01398 71.51 71.51 1 eta 1.3
## 5 0.01398 71.51 71.51 1 eta 1.3
## vary_id
## <chr>
## 1 BDI_total/low/medium propensity and high propensity sample
## 2 GSI_total/low/medium propensity and high propensity sample
## 3 SF-36_mental_health/low/medium propensity and high propensity sample
## 4 SF-36_physical_health/low/medium propensity and high propensity sample
## 5 SF-36_social_functioning/low/medium propensity and high propensity sample
Data was extracted from Table 2 (p. 1186)
# Data from Table 2 (p. 1186) provides mean and standard deviation. Table also
# indcludes p-values indicating "Test of significance between the two groups
# using repeated-measures analysis with PROC MIXED " (Sajatovic et al. 2009: 1186)
Sajatovic2009 <- tibble(
group = rep(c("Life Goals Program", # Intervention
"Treatment as usual"), # Control
each = 1,9),
outcome = rep(c("HAM-D", # Hamilton Depression Rating Scale
"YMRS", # Young Mania Rating Scale
"GAS"), # Global Assessment Scale
each = 2,3),
timing = rep(c("3m", "6m", "12m"), each = 6),
N_start = rep(c(
83, 80,
84, 80,
83, 78
), each = 1, 3),
N = c(
# 3 months
63, 65,
63, 65,
61, 61,
# 6 months
51, 55,
51, 55,
46, 53,
# 12 months
41, 39,
41, 39,
40, 39
),
m_pre = rep(c(
19.98, 17.08, # HAM-D
7.3, 7.58, # YMRS
56.53, 58.22 # GAS
), each = 1,3),
sd_pre = rep(c(
11.45, 10.99,
5.41, 5.44,
12.43, 12.00
), each = 1, 3),
m_post = c(
# 3 months
16.30, 15.85,
6.14, 8.02,
60.10, 59.05,
# 6 months
16.35, 15.96,
6.78, 7.69,
61.72, 62.19,
# 12 months
16.02, 14.39,
5.85, 7.15,
63.70, 64.51
),
sd_post = c(
# 3 months
9.68, 10.52,
4.85, 5.38,
11.63, 12.44,
# 6 months
10.18, 12.47,
5.36, 6.26,
12.76, 14.42,
# 12 months
11.73, 10.87,
4.74, 5.60,
12.66, 15.90
)
)
# Making the sajatovic2009 tibble wide in order to estimate the effect sizes and
# further analysis.
# Turning data into wide format
Sajatovic2009_wide <-
Sajatovic2009 |>
mutate(group = case_match(group, "Life Goals Program" ~ "t", "Treatment as usual" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
)
Sajatovic2009_est <-
Sajatovic2009_wide |>
mutate(
# P-values obtained from table 2, calculated with repeated-measures analysis with
# PROC MIXED in SAS (p. 1186) -
# p_val = rep(c(0.40, 0.22, 0.97), each = 1,3), # Made across time measurements
analysis_plan = rep(
c("All mental health outcomes/Depression", # HAM-D
"All mental health outcomes", # YMRS
"Social functioning (degree of impairment)" # GAS
), 3),
study = "Sajatovic et al. 2009",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(timing = factor(timing, levels = c("3m", "6m", "12m"))) |>
# arrange(outcome, timing)|>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# For YMRS and HAM-D lower scores are beneficial why these are reverted
m_post = if_else(outcome != "GAS", (m_post_t - m_post_c)*-1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For YMRS and HAM-D lower scores are beneficial why these are reverted
m_diff_t = if_else(outcome != "GAS",
(m_post_t - m_pre_t)*-1,
m_post_t - m_pre_t),
m_diff_c = if_else(outcome != "GAS",
(m_post_c - m_pre_c)*-1,
m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# "Group size was generally six to eight members" (p. 1183)
avg_cl_size = 7,
avg_cl_type = "From study (p. 1183)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste0(outcome, "/", timing)
) |>
ungroup(); Sajatovic2009_est
## # A tibble: 9 × 62
## outcome timing N_start_t N_start_c N_t N_c m_pre_t m_pre_c sd_pre_t
## <chr> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 HAM-D 3m 83 80 63 65 19.98 17.08 11.45
## 2 YMRS 3m 84 80 63 65 7.3 7.58 5.41
## 3 GAS 3m 83 78 61 61 56.53 58.22 12.43
## 4 HAM-D 6m 83 80 51 55 19.98 17.08 11.45
## 5 YMRS 6m 84 80 51 55 7.3 7.58 5.41
## 6 GAS 6m 83 78 46 53 56.53 58.22 12.43
## 7 HAM-D 12m 83 80 41 39 19.98 17.08 11.45
## 8 YMRS 12m 84 80 41 39 7.3 7.58 5.41
## 9 GAS 12m 83 78 40 39 56.53 58.22 12.43
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 10.99 16.3 15.85 9.68 10.52
## 2 5.44 6.14 8.02 4.85 5.38
## 3 12 60.1 59.05 11.63 12.44
## 4 10.99 16.35 15.96 10.18 12.47
## 5 5.44 6.78 7.69 5.36 6.26
## 6 12 61.72 62.19 12.76 14.42
## 7 10.99 16.02 14.39 11.73 10.87
## 8 5.44 5.85 7.15 4.74 5.6
## 9 12 63.7 64.51 12.66 15.9
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 All mental health outcomes/Depression Sajatovic et al. 2009 SMD
## 2 All mental health outcomes Sajatovic et al. 2009 SMD
## 3 Social functioning (degree of impairment) Sajatovic et al. 2009 SMD
## 4 All mental health outcomes/Depression Sajatovic et al. 2009 SMD
## 5 All mental health outcomes Sajatovic et al. 2009 SMD
## 6 Social functioning (degree of impairment) Sajatovic et al. 2009 SMD
## 7 All mental health outcomes/Depression Sajatovic et al. 2009 SMD
## 8 All mental health outcomes Sajatovic et al. 2009 SMD
## 9 Social functioning (degree of impairment) Sajatovic et al. 2009 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind m_post
## <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 128 128 -0.4500
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 128 128 1.88
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 122 122 1.050
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 106 106 -0.3900
## 5 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 106 106 0.91
## 6 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 99 99 -0.4700
## 7 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 80 80 -1.630
## 8 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 80 80 1.3
## 9 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 79 79 -0.8100
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 10.12 -0.04449 0.03127 0.03126 0.9941 -0.04423 0.03127 0.03126 3.68
## 2 5.126 0.3668 0.03178 0.03126 0.9941 0.3646 0.03178 0.03126 1.16
## 3 12.04 0.08720 0.03282 0.03279 0.9938 0.08666 0.03282 0.03279 3.57
## 4 11.43 -0.03413 0.03780 0.03779 0.9929 -0.03389 0.03780 0.03779 3.63
## 5 5.845 0.1557 0.03790 0.03779 0.9929 0.1546 0.03790 0.03779 0.5200
## 6 13.67 -0.03437 0.04061 0.04061 0.9924 -0.03411 0.04061 0.04061 5.19
## 7 11.32 -0.1440 0.05016 0.05003 0.9906 -0.1426 0.05016 0.05003 3.96
## 8 5.177 0.2511 0.05043 0.05003 0.9906 0.2488 0.05042 0.05003 1.45
## 9 14.35 -0.05644 0.05066 0.05064 0.9905 -0.05591 0.05066 0.05064 7.17
## m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.230 0.2422 0.03149 0.03126 0.2408 0.03148 0.03126 7
## 2 -0.4400 0.3121 0.03164 0.03126 0.3103 0.03163 0.03126 7
## 3 0.8300 0.2275 0.03300 0.03279 0.2261 0.03300 0.03279 7
## 4 1.120 0.2197 0.03802 0.03779 0.2181 0.03801 0.03779 7
## 5 -0.1100 0.1078 0.03784 0.03779 0.1070 0.03784 0.03779 7
## 6 3.97 0.08921 0.04065 0.04061 0.08854 0.04065 0.04061 7
## 7 2.690 0.1122 0.05011 0.05003 0.1111 0.05011 0.05003 7
## 8 0.4300 0.1970 0.05027 0.05003 0.1952 0.05027 0.05003 7
## 9 6.290 0.06132 0.05066 0.05064 0.06074 0.05066 0.05064 7
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 1183) 0.1 Imputed 1 0.972 122.0 0.9938
## 2 From study (p. 1183) 0.1 Imputed 1 0.972 122.0 0.9938
## 3 From study (p. 1183) 0.1 Imputed 1 0.972 116.2 0.9935
## 4 From study (p. 1183) 0.1 Imputed 1 0.971 100.8 0.9925
## 5 From study (p. 1183) 0.1 Imputed 1 0.971 100.8 0.9925
## 6 From study (p. 1183) 0.1 Imputed 1 0.97 94.17 0.9920
## 7 From study (p. 1183) 0.1 Imputed 1 0.971 75.57 0.9900
## 8 From study (p. 1183) 0.1 Imputed 1 0.971 75.57 0.9900
## 9 From study (p. 1183) 0.1 Imputed 1 0.971 74.64 0.9899
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.04297 0.03924 0.03923 0.2340 0.03945 0.03923 0.1068 0.008196 122.0
## 2 0.3543 0.03974 0.03923 0.3015 0.03960 0.03923 0.1376 0.008196 122.0
## 3 0.08421 0.04101 0.04098 0.2197 0.04119 0.04098 0.1006 0.008608 116.2
## 4 -0.03289 0.04773 0.04773 0.2117 0.04795 0.04773 0.09643 0.009917 100.8
## 5 0.1501 0.04784 0.04773 0.1039 0.04778 0.04773 0.04734 0.009917 100.8
## 6 -0.03307 0.05178 0.05177 0.08585 0.05181 0.05177 0.03887 0.01062 94.17
## 7 -0.1384 0.06222 0.06209 0.1079 0.06217 0.06209 0.04978 0.01323 75.57
## 8 0.2414 0.06247 0.06209 0.1894 0.06233 0.06209 0.08739 0.01323 75.57
## 9 -0.05425 0.06312 0.06310 0.05894 0.06312 0.06310 0.02716 0.01340 74.64
## df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <chr> <dbl> <chr>
## 1 122.0 1 eta 1.255 HAM-D/3m
## 2 122.0 1 eta 1.255 YMRS/3m
## 3 116.2 1 eta 1.25 GAS/3m
## 4 100.8 1 eta 1.263 HAM-D/6m
## 5 100.8 1 eta 1.263 YMRS/6m
## 6 94.17 1 eta 1.275 GAS/6m
## 7 75.57 1 eta 1.241 HAM-D/12m
## 8 75.57 1 eta 1.241 YMRS/12m
## 9 74.64 1 eta 1.246 GAS/12m
Sample size data was extracted from page 5. Effect size data was retrieved from Table 1 and text reported results (p. 6)
Saloheimo2016_est <-
tibble(
study = "Saloheimo 2016",
outcome = "HAM-D",
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
timing = "3m",
N_start_t = 42,
N_start_c = 46,
N_t = 27,
N_c = 34,
N_total = N_t + N_c,
# I cant find these results anywhere (JKJ)
m_pre_t = 19.3,
m_pre_c = 18.9,
sd_pre_t = 3.8,
sd_pre_c = 3.7,
m_post_t = 8.3,
m_post_c = 11.1,
sd_post_t = 6.3,
sd_post_c = 6.4
) |>
mutate(
analysis_plan = "All mental health outcomes/Depression",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
df_ind = N_total,
# HAM-D lower scores are beneficial, thus these are reverted
m_post = (m_post_t - m_post_c)*-1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For YMRS and HAM-D lower scores are beneficial why these are reverted
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate( # Attempt to make cluster corrected estimates. Has to be checked!
# "Therapists act as coaches for groups of 4-6 patients" (p. 3)
avg_cl_size = 3.47,
avg_cl_type = "From study (p. 4)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = paste0(outcome, " (one es only)")
) |>
ungroup(); Saloheimo2016_est
## # A tibble: 1 × 62
## study outcome effect_size sd_used main_es_method
## <chr> <chr> <chr> <chr> <chr>
## 1 Saloheimo 2016 HAM-D SMD Pooled posttest SDs Raw diff-in-diffs
## timing N_start_t N_start_c N_t N_c N_total m_pre_t m_pre_c sd_pre_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3m 42 46 27 34 61 19.3 18.9 3.8
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3.7 8.3 11.1 6.3 6.4
## analysis_plan ppcor ppcor_method df_ind m_post sd_pool
## <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 All mental health outcomes/Depression 0.5 Imputed 61 2.8 6.356
## d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c d_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.4405 0.06804 0.06645 0.9877 0.4351 0.06800 0.06645 11 7.8 0.5035
## vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.06853 0.06645 0.4972 0.06848 0.06645 3.47 From study (p. 4) 0.1
## icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 1 0.969 58.19 0.9871 0.4213 0.07415 0.07263
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.4815 0.07462 0.07263 0.2332 0.01719 58.19 58.19 1 eta
## adj_value_DD vary_id
## <dbl> <chr>
## 1 1.093 HAM-D (one es only)
Data was extracted from Tables 1, 2, and 3 in the same article
# Based on table 1, 2 and 3 in the same article
Schrank2016 <-
tibble(
group = rep(c("Intervention", "Control"), each = 1, 6),
outcome = rep(c(
"WEMWBS",
"MANSA",
# "PPI",
"BPRS",
# "SDHS",
"IHS",
"RSES",
"RES"
), each = 2,1),
N_start = 47,
N = rep(c(
43, 41
), each = 1, 6),
m_pre = c(
3.19, 3.00,
4.05, 4.14,
#3.58, 3.44,
30.70, 33.57,
#2.29, 2.48,
4.02, 3.72,
2.24, 2.09,
2.74, 2.71
),
sd_pre = c(
0.76, 0.89,
0.85, 1.01,
# 0.73, 0.80,
8.81, 8.42,
# 0.69, 0.76,
0.79, 0.85,
0.64, 0.66,
0.32, 0.32
),
m_post = c(
3.36,3.24,
4.42, 4.21,
# 3.72, 3.48,
29.37, 33.23,
# 2.13, 2.34,
4.11, 4.04,
2.37, 2.21,
2.8,2.73
),
se_post = c(
0.10, 0.10,
0.10, 0.10,
# 0.07, 0.07,
0.96, 0.98,
# 0.08, 0.09,
0.1, 0.1,
0.07, 0.07,
0.04,0.04)
) |>
mutate(sd_post = se_post * sqrt(N)) # Calculating the standard deviation from the standard error
Schrank2016_wide <-
Schrank2016 |>
mutate (group = case_match(
group, "Intervention" ~ "t", "Control" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
)
Schrank2016_est <-
Schrank2016_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "WEMWBS|MANSA") ~ "Wellbeing and Quality of Life",
str_detect(outcome, "BPRS") ~ "All mental health outcomes",
str_detect(outcome, "IHS|RSES|RES") ~ "Hope, Empowerment & Self-efficacy",
.default = NA_character_
),
# ANCOVA results from table 3, p. 242
F_val = c(
0.8,
2.3,
# 5.9,
7.8,
# 3.0,
3.0,
2.9,
2.0
),
df1 = rep(c(1)),
df2 = rep(c(81)),
p_val_f = c(
0.15,
0.21,
# 0.30,
0.42,
# 0.29,
0.08,
0.23,
0.22
)
) |>
mutate(
study = "Schrank et al. 2016",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
N_total = N_t + N_c,
df_ind = N_total,
ppcor_method = "Not computable - F value used for variance estimation",
# The outcome BPRS is reverted because lower score is beneficial
m_post = if_else(outcome != "BPRS",
m_post_t - m_post_c,
(m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# The outcome BPRS is reverted because lower score is beneficial
m_diff_t = if_else(outcome != "BPRS",
m_post_t - m_pre_t,
(m_post_t - m_pre_t)*-1),
m_diff_c = if_else(outcome != "BPRS",
m_post_c - m_pre_c,
(m_post_c - m_pre_c)*-1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = d_DD^2/F_val + d_DD^2/(2*df_ind),
Wd_DD = d_DD^2/F_val,
g_DD = J * d_DD,
vg_DD = g_DD^2/F_val + g_DD^2/(2*df_ind),
Wg_DD = g_DD^2/F_val
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# "WELLFOCUS PPT was provided to six groups, and each group had an average of eight" (p. 238)
avg_cl_size = 8,
avg_cl_type = "From study (p. 238)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = grp_size_imp),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
F_val = F_val,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Schrank2016_est
## # A tibble: 6 × 66
## outcome N_start_t N_start_c N_t N_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 WEMWBS 47 47 43 41 3.19 3 0.76 0.89
## 2 MANSA 47 47 43 41 4.05 4.14 0.85 1.01
## 3 BPRS 47 47 43 41 30.7 33.57 8.81 8.42
## 4 IHS 47 47 43 41 4.02 3.72 0.79 0.85
## 5 RSES 47 47 43 41 2.24 2.09 0.64 0.66
## 6 RES 47 47 43 41 2.74 2.71 0.32 0.32
## m_post_t m_post_c se_post_t se_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3.36 3.24 0.1 0.1 0.6557 0.6403
## 2 4.42 4.21 0.1 0.1 0.6557 0.6403
## 3 29.37 33.23 0.96 0.98 6.295 6.275
## 4 4.11 4.04 0.1 0.1 0.6557 0.6403
## 5 2.37 2.21 0.07 0.07 0.4590 0.4482
## 6 2.8 2.73 0.04 0.04 0.2623 0.2561
## analysis_plan F_val df1 df2 p_val_f
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Wellbeing and Quality of Life 0.8 1 81 0.15
## 2 Wellbeing and Quality of Life 2.3 1 81 0.21
## 3 All mental health outcomes 7.8 1 81 0.42
## 4 Hope, Empowerment & Self-efficacy 3 1 81 0.08
## 5 Hope, Empowerment & Self-efficacy 2.9 1 81 0.23
## 6 Hope, Empowerment & Self-efficacy 2 1 81 0.22
## study effect_size sd_used main_es_method N_total
## <chr> <chr> <chr> <chr> <dbl>
## 1 Schrank et al. 2016 SMD Pooled posttest SD Raw diff-in-diffs 84
## 2 Schrank et al. 2016 SMD Pooled posttest SD Raw diff-in-diffs 84
## 3 Schrank et al. 2016 SMD Pooled posttest SD Raw diff-in-diffs 84
## 4 Schrank et al. 2016 SMD Pooled posttest SD Raw diff-in-diffs 84
## 5 Schrank et al. 2016 SMD Pooled posttest SD Raw diff-in-diffs 84
## 6 Schrank et al. 2016 SMD Pooled posttest SD Raw diff-in-diffs 84
## df_ind ppcor_method m_post sd_pool
## <dbl> <chr> <dbl> <dbl>
## 1 84 Not computable - F value used for variance estimation 0.1200 0.6483
## 2 84 Not computable - F value used for variance estimation 0.21 0.6483
## 3 84 Not computable - F value used for variance estimation 3.860 6.285
## 4 84 Not computable - F value used for variance estimation 0.07000 0.6483
## 5 84 Not computable - F value used for variance estimation 0.1600 0.4538
## 6 84 Not computable - F value used for variance estimation 0.07000 0.2593
## d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1851 0.04785 0.04765 0.9910 0.1835 0.04785 0.04765 0.17 0.2400
## 2 0.3239 0.04827 0.04765 0.9910 0.3210 0.04826 0.04765 0.37 0.07000
## 3 0.6141 0.04989 0.04765 0.9910 0.6086 0.04985 0.04765 1.330 0.3400
## 4 0.1080 0.04772 0.04765 0.9910 0.1070 0.04771 0.04765 0.09000 0.3200
## 5 0.3526 0.04839 0.04765 0.9910 0.3494 0.04837 0.04765 0.1300 0.1200
## 6 0.2700 0.04808 0.04765 0.9910 0.2675 0.04807 0.04765 0.06000 0.02000
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.1080 0.01464 0.01457 -0.1070 0.01438 0.01431 8
## 2 0.4628 0.09439 0.09311 0.4586 0.09271 0.09145 8
## 3 0.1575 0.003328 0.003181 0.1561 0.003269 0.003124 8
## 4 -0.3548 0.04271 0.04196 -0.3516 0.04195 0.04121 8
## 5 0.02204 0.0001703 0.0001675 0.02184 0.0001673 0.0001645 8
## 6 0.1543 0.01204 0.01190 0.1529 0.01182 0.01169 8
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 238) 0.1 Imputed 1 0.971 79.12 0.9905
## 2 From study (p. 238) 0.1 Imputed 1 0.971 79.12 0.9905
## 3 From study (p. 238) 0.1 Imputed 1 0.971 79.12 0.9905
## 4 From study (p. 238) 0.1 Imputed 1 0.971 79.12 0.9905
## 5 From study (p. 238) 0.1 Imputed 1 0.971 79.12 0.9905
## 6 From study (p. 238) 0.1 Imputed 1 0.971 79.12 0.9905
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.1780 0.06166 0.06146 -0.1039 0.01746 0.01739 -0.08848 0.01264 79.12
## 2 0.3116 0.06208 0.06146 0.4451 0.1124 0.1111 0.1498 0.01264 79.12
## 3 0.5906 0.06367 0.06146 0.1515 0.003940 0.003795 0.2747 0.01264 79.12
## 4 0.1039 0.06153 0.06146 -0.3412 0.05080 0.05007 -0.1710 0.01264 79.12
## 5 0.3391 0.06219 0.06146 0.02119 0.0002027 0.0001998 0.1682 0.01264 79.12
## 6 0.2596 0.06189 0.06146 0.1484 0.01434 0.01420 0.1398 0.01264 79.12
## df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <chr> <dbl> <chr>
## 1 79.12 1 eta 1.29 WEMWBS
## 2 79.12 1 eta 1.29 MANSA
## 3 79.12 1 eta 1.29 BPRS
## 4 79.12 1 eta 1.29 IHS
## 5 79.12 1 eta 1.29 RSES
## 6 79.12 1 eta 1.29 RES
# Taken from table 2, p. 9
schafer2019 <- tibble(
group = as.factor(rep(c("Seeking Safety",
"Relapse Prevention Training",
"TAU"),
each = 1, 21)),
outcome = (rep(c("PSS-I",
"PDS",
"Drug and alcohol free days",
"ASI alcohol severity",
"ASI drug severity",
"BDI-II",
"DERS"),
each = 3,3)),
timing = rep(c("Post", "3m", "6m"), each = 21),
N_start = rep(c(111, 115, 117), each = 1, 21),
N = rep(c(111, 115, 117), each = 1, 21),
m_pre = rep(c(
25.4, 27.5, 28.9,
25.7, 27.6, 27.7,
16.6, 15.6, 15.6,
.28, .33, .32,
.09, .1, .09,
25.3, 29.4, 28.6,
100.5, 110.7, 111.9),
each = 1,3), # fordi der er tre opfølgningsperioder
sd_pre = rep(c(
9.7, 9.8, 9.4,
11.2, 10., 10.2,
12.1, 11.9, 12.3,
.25, .29, .27,
.11, .14, .11,
13.2, 11.7, 10.9,
26.9, 24.6, 25.3),
each = 1,3), #fordi tre opfølgningsperioder
m_post = c(
# post mean values
22.9, 24.3, 26.1,
20.8, 23., 24.,
18.3, 19.4, 16.3,
.22, .25, .3,
.07, .06, .08,
19., 26.2, 25.8,
95.6, 102.9, 109.1,
# 3m follow-up
22.1, 23.7, 24.5,
20.9, 22.5, 24.3,
19.5, 21.1, 17.6,
0.2, 0.25, 0.28,
.06, .06, .06,
19.9, 25., 25.2,
94.1, 100.9, 106.8,
#6m follow-up
22.1, 20.7, 24.3,
19.4, 19.9, 23.7,
20.5, 22.4, 16.4,
.24, .19, .27,
.05, .04, .07,
18.5, 22.3, 24.1,
92.7, 100., 107.3),
sd_post = c(
# post sd values
12.4, 11.9, 10.3,
12.0, 11.2, 10.7,
11.9, 11.7, 12.4,
.24, .24, .28,
.12, .11, .11,
12.4, 12., 12.6,
24.7, 26.4, 24.5,
# 3m sd values
12.2, 11.5, 11.8,
13.8, 11.5, 12.5,
11.6, 10.2, 11.9,
.23, .26, .28,
.11, .12, .10,
14.4, 14., 13.0,
27.2, 27.8, 26.1,
# 6m sd values
11.5, 11., 11.4,
11.9, 11.7, 12.5,
11.3, 10.7, 12.7,
.26, .22, .28,
.10, .10, .11,
12.5, 13.3, 14.0,
24.7, 25.2, 25.4
)
)
# Effect sizes can be seen in table 2, p. 9
schafer2019_Relapse_wide <-
schafer2019 |>
filter(!str_detect(group, "Seeking")) |>
mutate(group = case_match(group, "Relapse Prevention Training" ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) |>
mutate(
treatment = "Relapse Prevention Training"
) |>
relocate(treatment)
schafer2019_Seeking_wide <-
schafer2019 |>
filter(!str_detect(group, "Relapse")) |>
mutate(group = case_match(group, "Seeking Safety" ~ "t", "TAU" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) |>
mutate(
treatment = "Seeking Safety"
) |>
relocate(treatment)
schafer2019_est <-
bind_rows(schafer2019_Relapse_wide, schafer2019_Seeking_wide) |>
arrange(outcome, timing) |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "ASI|Drug and alcohol free days") ~ "Alcohol and drug abuse/misuse",
str_detect(outcome, "BDI-II") ~ "All mental health outcomes/Depression",
str_detect(outcome, "DERS") ~ "Unused outcomes",
str_detect(outcome, "PDS|PSS-I") ~ "All mental health outcomes",
.default = NA_character_
),
study = "Schäfer et al. 2019",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor is imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
m_post = (m_post_t - m_post_c) * -1,
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For all scores: Lower is beneficial
m_diff_t = (m_post_t - m_pre_t)*-1,
m_diff_c = (m_post_c - m_pre_c)*-1,
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Group size was bup to 8 (p. 4)
avg_cl_size = 8,
avg_cl_type = "From study (p. 4)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD),
vary_id = paste(outcome, timing, treatment, sep = "/")
) |>
ungroup(); schafer2019_est
## # A tibble: 42 × 63
## treatment outcome timing N_start_t
## <chr> <chr> <chr> <dbl>
## 1 Relapse Prevention Training ASI alcohol severity 3m 115
## 2 Seeking Safety ASI alcohol severity 3m 111
## 3 Relapse Prevention Training ASI alcohol severity 6m 115
## 4 Seeking Safety ASI alcohol severity 6m 111
## 5 Relapse Prevention Training ASI alcohol severity Post 115
## 6 Seeking Safety ASI alcohol severity Post 111
## 7 Relapse Prevention Training ASI drug severity 3m 115
## 8 Seeking Safety ASI drug severity 3m 111
## 9 Relapse Prevention Training ASI drug severity 6m 115
## 10 Seeking Safety ASI drug severity 6m 111
## 11 Relapse Prevention Training ASI drug severity Post 115
## 12 Seeking Safety ASI drug severity Post 111
## 13 Relapse Prevention Training BDI-II 3m 115
## 14 Seeking Safety BDI-II 3m 111
## 15 Relapse Prevention Training BDI-II 6m 115
## 16 Seeking Safety BDI-II 6m 111
## 17 Relapse Prevention Training BDI-II Post 115
## 18 Seeking Safety BDI-II Post 111
## 19 Relapse Prevention Training DERS 3m 115
## 20 Seeking Safety DERS 3m 111
## 21 Relapse Prevention Training DERS 6m 115
## 22 Seeking Safety DERS 6m 111
## 23 Relapse Prevention Training DERS Post 115
## 24 Seeking Safety DERS Post 111
## 25 Relapse Prevention Training Drug and alcohol free days 3m 115
## 26 Seeking Safety Drug and alcohol free days 3m 111
## 27 Relapse Prevention Training Drug and alcohol free days 6m 115
## 28 Seeking Safety Drug and alcohol free days 6m 111
## 29 Relapse Prevention Training Drug and alcohol free days Post 115
## 30 Seeking Safety Drug and alcohol free days Post 111
## 31 Relapse Prevention Training PDS 3m 115
## 32 Seeking Safety PDS 3m 111
## 33 Relapse Prevention Training PDS 6m 115
## 34 Seeking Safety PDS 6m 111
## 35 Relapse Prevention Training PDS Post 115
## 36 Seeking Safety PDS Post 111
## 37 Relapse Prevention Training PSS-I 3m 115
## 38 Seeking Safety PSS-I 3m 111
## 39 Relapse Prevention Training PSS-I 6m 115
## 40 Seeking Safety PSS-I 6m 111
## 41 Relapse Prevention Training PSS-I Post 115
## 42 Seeking Safety PSS-I Post 111
## N_start_c N_t N_c m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 117 115 117 0.33 0.32 0.29 0.27 0.25 0.28
## 2 117 111 117 0.28 0.32 0.25 0.27 0.2 0.28
## 3 117 115 117 0.33 0.32 0.29 0.27 0.19 0.27
## 4 117 111 117 0.28 0.32 0.25 0.27 0.24 0.27
## 5 117 115 117 0.33 0.32 0.29 0.27 0.25 0.3
## 6 117 111 117 0.28 0.32 0.25 0.27 0.22 0.3
## 7 117 115 117 0.1 0.09 0.14 0.11 0.06 0.06
## 8 117 111 117 0.09 0.09 0.11 0.11 0.06 0.06
## 9 117 115 117 0.1 0.09 0.14 0.11 0.04 0.07
## 10 117 111 117 0.09 0.09 0.11 0.11 0.05 0.07
## 11 117 115 117 0.1 0.09 0.14 0.11 0.06 0.08
## 12 117 111 117 0.09 0.09 0.11 0.11 0.07 0.08
## 13 117 115 117 29.4 28.6 11.7 10.9 25 25.2
## 14 117 111 117 25.3 28.6 13.2 10.9 19.9 25.2
## 15 117 115 117 29.4 28.6 11.7 10.9 22.3 24.1
## 16 117 111 117 25.3 28.6 13.2 10.9 18.5 24.1
## 17 117 115 117 29.4 28.6 11.7 10.9 26.2 25.8
## 18 117 111 117 25.3 28.6 13.2 10.9 19 25.8
## 19 117 115 117 110.7 111.9 24.6 25.3 100.9 106.8
## 20 117 111 117 100.5 111.9 26.9 25.3 94.1 106.8
## 21 117 115 117 110.7 111.9 24.6 25.3 100 107.3
## 22 117 111 117 100.5 111.9 26.9 25.3 92.7 107.3
## 23 117 115 117 110.7 111.9 24.6 25.3 102.9 109.1
## 24 117 111 117 100.5 111.9 26.9 25.3 95.6 109.1
## 25 117 115 117 15.6 15.6 11.9 12.3 21.1 17.6
## 26 117 111 117 16.6 15.6 12.1 12.3 19.5 17.6
## 27 117 115 117 15.6 15.6 11.9 12.3 22.4 16.4
## 28 117 111 117 16.6 15.6 12.1 12.3 20.5 16.4
## 29 117 115 117 15.6 15.6 11.9 12.3 19.4 16.3
## 30 117 111 117 16.6 15.6 12.1 12.3 18.3 16.3
## 31 117 115 117 27.6 27.7 10 10.2 22.5 24.3
## 32 117 111 117 25.7 27.7 11.2 10.2 20.9 24.3
## 33 117 115 117 27.6 27.7 10 10.2 19.9 23.7
## 34 117 111 117 25.7 27.7 11.2 10.2 19.4 23.7
## 35 117 115 117 27.6 27.7 10 10.2 23 24
## 36 117 111 117 25.7 27.7 11.2 10.2 20.8 24
## 37 117 115 117 27.5 28.9 9.8 9.4 23.7 24.5
## 38 117 111 117 25.4 28.9 9.7 9.4 22.1 24.5
## 39 117 115 117 27.5 28.9 9.8 9.4 20.7 24.3
## 40 117 111 117 25.4 28.9 9.7 9.4 22.1 24.3
## 41 117 115 117 27.5 28.9 9.8 9.4 24.3 26.1
## 42 117 111 117 25.4 28.9 9.7 9.4 22.9 26.1
## sd_post_t sd_post_c analysis_plan study
## <dbl> <dbl> <chr> <chr>
## 1 0.26 0.28 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 2 0.23 0.28 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 3 0.22 0.28 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 4 0.26 0.28 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 5 0.24 0.28 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 6 0.24 0.28 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 7 0.12 0.1 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 8 0.11 0.1 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 9 0.1 0.11 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 10 0.1 0.11 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 11 0.11 0.11 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 12 0.12 0.11 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 13 14 13 All mental health outcomes/Depression Schäfer et al. 2019
## 14 14.4 13 All mental health outcomes/Depression Schäfer et al. 2019
## 15 13.3 14 All mental health outcomes/Depression Schäfer et al. 2019
## 16 12.5 14 All mental health outcomes/Depression Schäfer et al. 2019
## 17 12 12.6 All mental health outcomes/Depression Schäfer et al. 2019
## 18 12.4 12.6 All mental health outcomes/Depression Schäfer et al. 2019
## 19 27.8 26.1 Unused outcomes Schäfer et al. 2019
## 20 27.2 26.1 Unused outcomes Schäfer et al. 2019
## 21 25.2 25.4 Unused outcomes Schäfer et al. 2019
## 22 24.7 25.4 Unused outcomes Schäfer et al. 2019
## 23 26.4 24.5 Unused outcomes Schäfer et al. 2019
## 24 24.7 24.5 Unused outcomes Schäfer et al. 2019
## 25 10.2 11.9 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 26 11.6 11.9 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 27 10.7 12.7 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 28 11.3 12.7 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 29 11.7 12.4 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 30 11.9 12.4 Alcohol and drug abuse/misuse Schäfer et al. 2019
## 31 11.5 12.5 All mental health outcomes Schäfer et al. 2019
## 32 13.8 12.5 All mental health outcomes Schäfer et al. 2019
## 33 11.7 12.5 All mental health outcomes Schäfer et al. 2019
## 34 11.9 12.5 All mental health outcomes Schäfer et al. 2019
## 35 11.2 10.7 All mental health outcomes Schäfer et al. 2019
## 36 12 10.7 All mental health outcomes Schäfer et al. 2019
## 37 11.5 11.8 All mental health outcomes Schäfer et al. 2019
## 38 12.2 11.8 All mental health outcomes Schäfer et al. 2019
## 39 11 11.4 All mental health outcomes Schäfer et al. 2019
## 40 11.5 11.4 All mental health outcomes Schäfer et al. 2019
## 41 11.9 10.3 All mental health outcomes Schäfer et al. 2019
## 42 12.4 10.3 All mental health outcomes Schäfer et al. 2019
## effect_size sd_used main_es_method ppcor ppcor_method N_total
## <chr> <chr> <chr> <dbl> <chr> <dbl>
## 1 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 2 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 3 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 4 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 5 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 6 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 7 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 8 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 9 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 10 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 11 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 12 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 13 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 14 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 15 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 16 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 17 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 18 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 19 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 20 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 21 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 22 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 23 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 24 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 25 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 26 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 27 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 28 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 29 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 30 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 31 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 32 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 33 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 34 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 35 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 36 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 37 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 38 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 39 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 40 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## 41 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 232
## 42 SMD Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 228
## df_ind m_post sd_pool d_post vd_post Wd_post J g_post vg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 232 0.03000 0.2703 0.1110 0.01727 0.01724 0.9968 0.1106 0.01727
## 2 228 0.08 0.2569 0.3114 0.01777 0.01756 0.9967 0.3104 0.01777
## 3 232 0.08 0.2521 0.3174 0.01746 0.01724 0.9968 0.3164 0.01746
## 4 228 0.03000 0.2705 0.1109 0.01758 0.01756 0.9967 0.1106 0.01758
## 5 232 0.05 0.2609 0.1916 0.01732 0.01724 0.9968 0.1910 0.01732
## 6 228 0.08 0.2613 0.3062 0.01776 0.01756 0.9967 0.3052 0.01776
## 7 232 0 0.1104 0 0.01724 0.01724 0.9968 0 0.01724
## 8 228 0 0.1050 0 0.01756 0.01756 0.9967 0 0.01756
## 9 232 0.03 0.1052 0.2853 0.01742 0.01724 0.9968 0.2843 0.01742
## 10 228 0.02 0.1053 0.1900 0.01764 0.01756 0.9967 0.1894 0.01763
## 11 232 0.02 0.11 0.1818 0.01731 0.01724 0.9968 0.1812 0.01731
## 12 228 0.0100 0.1150 0.08697 0.01757 0.01756 0.9967 0.08669 0.01757
## 13 232 0.2000 13.50 0.01481 0.01724 0.01724 0.9968 0.01476 0.01724
## 14 228 5.3 13.70 0.3869 0.01788 0.01756 0.9967 0.3856 0.01788
## 15 232 1.8 13.66 0.1318 0.01728 0.01724 0.9968 0.1314 0.01728
## 16 228 5.6 13.29 0.4213 0.01795 0.01756 0.9967 0.4199 0.01794
## 17 232 -0.4000 12.31 -0.03250 0.01724 0.01724 0.9968 -0.03240 0.01724
## 18 228 6.8 12.50 0.5439 0.01820 0.01756 0.9967 0.5421 0.01820
## 19 232 5.900 26.96 0.2189 0.01735 0.01724 0.9968 0.2182 0.01735
## 20 228 12.7 26.64 0.4767 0.01805 0.01756 0.9967 0.4751 0.01805
## 21 232 7.3 25.30 0.2885 0.01742 0.01724 0.9968 0.2876 0.01742
## 22 228 14.6 25.06 0.5826 0.01830 0.01756 0.9967 0.5806 0.01830
## 23 232 6.200 25.46 0.2435 0.01737 0.01724 0.9968 0.2427 0.01737
## 24 228 13.5 24.60 0.5488 0.01822 0.01756 0.9967 0.5470 0.01821
## 25 232 -3.5 11.09 -0.3156 0.01746 0.01724 0.9968 -0.3146 0.01746
## 26 228 -1.900 11.75 -0.1616 0.01761 0.01756 0.9967 -0.1611 0.01761
## 27 232 -6 11.75 -0.5106 0.01780 0.01724 0.9968 -0.5089 0.01780
## 28 228 -4.1 12.04 -0.3406 0.01781 0.01756 0.9967 -0.3394 0.01781
## 29 232 -3.100 12.06 -0.2571 0.01739 0.01724 0.9968 -0.2563 0.01738
## 30 228 -2 12.16 -0.1645 0.01762 0.01756 0.9967 -0.1639 0.01761
## 31 232 1.8 12.01 0.1498 0.01729 0.01724 0.9968 0.1493 0.01729
## 32 228 3.400 13.15 0.2586 0.01770 0.01756 0.9967 0.2577 0.01770
## 33 232 3.8 12.11 0.3138 0.01745 0.01724 0.9968 0.3128 0.01745
## 34 228 4.3 12.21 0.3521 0.01783 0.01756 0.9967 0.3510 0.01783
## 35 232 1 10.95 0.09132 0.01726 0.01724 0.9968 0.09102 0.01726
## 36 228 3.2 11.35 0.2819 0.01773 0.01756 0.9967 0.2810 0.01773
## 37 232 0.8000 11.65 0.06866 0.01725 0.01724 0.9968 0.06843 0.01725
## 38 228 2.400 12.00 0.2001 0.01764 0.01756 0.9967 0.1994 0.01764
## 39 232 3.6 11.20 0.3213 0.01747 0.01724 0.9968 0.3203 0.01746
## 40 228 2.2 11.45 0.1922 0.01764 0.01756 0.9967 0.1915 0.01764
## 41 232 1.8 11.12 0.1618 0.01730 0.01724 0.9968 0.1613 0.01730
## 42 228 3.200 11.37 0.2814 0.01773 0.01756 0.9967 0.2805 0.01773
## Wg_post m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.01724 0.08 0.0400 0.1480 0.01729 0.01724 0.1475 0.01729 0.01724
## 2 0.01756 0.08 0.0400 0.1557 0.01761 0.01756 0.1552 0.01761 0.01756
## 3 0.01724 0.14 0.05 0.3571 0.01752 0.01724 0.3559 0.01752 0.01724
## 4 0.01756 0.04000 0.05 -0.03698 0.01756 0.01756 -0.03685 0.01756 0.01756
## 5 0.01724 0.08 0.02000 0.2299 0.01736 0.01724 0.2292 0.01736 0.01724
## 6 0.01756 0.06 0.02000 0.1531 0.01761 0.01756 0.1526 0.01761 0.01756
## 7 0.01724 0.04 0.03 0.09061 0.01726 0.01724 0.09031 0.01726 0.01724
## 8 0.01756 0.03 0.03 0 0.01756 0.01756 0 0.01756 0.01756
## 9 0.01724 0.06 0.0200 0.3804 0.01755 0.01724 0.3791 0.01755 0.01724
## 10 0.01756 0.04 0.0200 0.1900 0.01764 0.01756 0.1894 0.01763 0.01756
## 11 0.01724 0.04 0.0100 0.2727 0.01740 0.01724 0.2718 0.01740 0.01724
## 12 0.01756 0.0200 0.0100 0.08697 0.01757 0.01756 0.08669 0.01757 0.01756
## 13 0.01724 4.4 3.400 0.07405 0.01725 0.01724 0.07381 0.01725 0.01724
## 14 0.01756 5.4 3.400 0.1460 0.01760 0.01756 0.1455 0.01760 0.01756
## 15 0.01724 7.1 4.5 0.1904 0.01732 0.01724 0.1898 0.01732 0.01724
## 16 0.01756 6.8 4.5 0.1730 0.01762 0.01756 0.1725 0.01762 0.01756
## 17 0.01724 3.2 2.8 0.03250 0.01724 0.01724 0.03240 0.01724 0.01724
## 18 0.01756 6.3 2.8 0.2799 0.01773 0.01756 0.2790 0.01773 0.01756
## 19 0.01724 9.8 5.100 0.1744 0.01731 0.01724 0.1738 0.01731 0.01724
## 20 0.01756 6.400 5.100 0.04880 0.01756 0.01756 0.04864 0.01756 0.01756
## 21 0.01724 10.7 4.600 0.2411 0.01737 0.01724 0.2403 0.01737 0.01724
## 22 0.01756 7.8 4.600 0.1277 0.01759 0.01756 0.1273 0.01759 0.01756
## 23 0.01724 7.8 2.800 0.1964 0.01733 0.01724 0.1958 0.01733 0.01724
## 24 0.01756 4.900 2.800 0.08537 0.01757 0.01756 0.08509 0.01757 0.01756
## 25 0.01724 -5.5 -2.000 -0.3156 0.01746 0.01724 -0.3146 0.01746 0.01724
## 26 0.01756 -2.9 -2.000 -0.07656 0.01757 0.01756 -0.07631 0.01757 0.01756
## 27 0.01724 -6.8 -0.8000 -0.5106 0.01780 0.01724 -0.5089 0.01780 0.01724
## 28 0.01756 -3.9 -0.8000 -0.2575 0.01770 0.01756 -0.2566 0.01770 0.01756
## 29 0.01724 -3.8 -0.7000 -0.2571 0.01739 0.01724 -0.2563 0.01738 0.01724
## 30 0.01756 -1.7 -0.7000 -0.08224 0.01757 0.01756 -0.08197 0.01757 0.01756
## 31 0.01724 5.1 3.4 0.1415 0.01729 0.01724 0.1410 0.01729 0.01724
## 32 0.01756 4.8 3.4 0.1065 0.01758 0.01756 0.1061 0.01758 0.01756
## 33 0.01724 7.7 4 0.3055 0.01744 0.01724 0.3045 0.01744 0.01724
## 34 0.01756 6.3 4 0.1883 0.01763 0.01756 0.1877 0.01763 0.01756
## 35 0.01724 4.6 3.7 0.08219 0.01726 0.01724 0.08192 0.01726 0.01724
## 36 0.01756 4.9 3.7 0.1057 0.01758 0.01756 0.1054 0.01758 0.01756
## 37 0.01724 3.8 4.4 -0.05149 0.01725 0.01724 -0.05133 0.01725 0.01724
## 38 0.01756 3.300 4.4 -0.09169 0.01757 0.01756 -0.09139 0.01757 0.01756
## 39 0.01724 6.8 4.6 0.1964 0.01733 0.01724 0.1957 0.01733 0.01724
## 40 0.01756 3.300 4.6 -0.1135 0.01758 0.01756 -0.1132 0.01758 0.01756
## 41 0.01724 3.2 2.800 0.03597 0.01725 0.01724 0.03585 0.01725 0.01724
## 42 0.01756 2.5 2.800 -0.02638 0.01756 0.01756 -0.02630 0.01756 0.01756
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 2 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 3 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 4 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 5 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 6 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 7 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 8 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 9 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 10 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 11 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 12 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 13 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 14 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 15 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 16 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 17 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 18 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 19 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 20 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 21 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 22 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 23 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 24 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 25 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 26 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 27 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 28 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 29 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 30 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 31 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 32 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 33 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 34 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 35 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 36 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 37 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 38 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 39 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 40 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## 41 8 From study (p. 4) 0.1 Imputed 1 0.973 221.3
## 42 8 From study (p. 4) 0.1 Imputed 1 0.972 217.6
## omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.9966 0.1076 0.02249 0.02247 0.1435 0.02251 0.02247 0.06433 0.004518
## 2 0.9965 0.3017 0.02323 0.02302 0.1508 0.02307 0.02302 0.06737 0.004595
## 3 0.9966 0.3078 0.02268 0.02247 0.3462 0.02274 0.02247 0.1550 0.004518
## 4 0.9965 0.1074 0.02304 0.02302 -0.03582 0.02302 0.02302 -0.01600 0.004595
## 5 0.9966 0.1858 0.02255 0.02247 0.2230 0.02258 0.02247 0.09990 0.004518
## 6 0.9965 0.2966 0.02322 0.02302 0.1483 0.02307 0.02302 0.06623 0.004595
## 7 0.9966 0 0.02247 0.02247 0.08786 0.02248 0.02247 0.03939 0.004518
## 8 0.9965 0 0.02302 0.02302 0 0.02302 0.02302 0 0.004595
## 9 0.9966 0.2766 0.02264 0.02247 0.3688 0.02277 0.02247 0.1650 0.004518
## 10 0.9965 0.1841 0.02309 0.02302 0.1841 0.02309 0.02302 0.08220 0.004595
## 11 0.9966 0.1763 0.02254 0.02247 0.2645 0.02263 0.02247 0.1185 0.004518
## 12 0.9965 0.08425 0.02303 0.02302 0.08425 0.02303 0.02302 0.03764 0.004595
## 13 0.9966 0.01436 0.02247 0.02247 0.07180 0.02248 0.02247 0.03220 0.004518
## 14 0.9965 0.3748 0.02334 0.02302 0.1414 0.02306 0.02302 0.06317 0.004595
## 15 0.9966 0.1278 0.02250 0.02247 0.1846 0.02254 0.02247 0.08273 0.004518
## 16 0.9965 0.4081 0.02340 0.02302 0.1676 0.02308 0.02302 0.07486 0.004595
## 17 0.9966 -0.03152 0.02247 0.02247 0.03152 0.02247 0.02247 0.01413 0.004518
## 18 0.9965 0.5268 0.02365 0.02302 0.2712 0.02318 0.02302 0.1210 0.004595
## 19 0.9966 0.2122 0.02257 0.02247 0.1691 0.02253 0.02247 0.07578 0.004518
## 20 0.9965 0.4618 0.02351 0.02302 0.04727 0.02302 0.02302 0.02112 0.004595
## 21 0.9966 0.2798 0.02264 0.02247 0.2338 0.02259 0.02247 0.1047 0.004518
## 22 0.9965 0.5643 0.02375 0.02302 0.1237 0.02305 0.02302 0.05525 0.004595
## 23 0.9966 0.2361 0.02259 0.02247 0.1904 0.02255 0.02247 0.08535 0.004518
## 24 0.9965 0.5316 0.02367 0.02302 0.08270 0.02303 0.02302 0.03695 0.004595
## 25 0.9966 -0.3060 0.02268 0.02247 -0.3060 0.02268 0.02247 -0.1370 0.004518
## 26 0.9965 -0.1566 0.02307 0.02302 -0.07416 0.02303 0.02302 -0.03313 0.004595
## 27 0.9966 -0.4951 0.02302 0.02247 -0.4951 0.02302 0.02247 -0.2211 0.004518
## 28 0.9965 -0.3299 0.02327 0.02302 -0.2494 0.02316 0.02302 -0.1113 0.004595
## 29 0.9966 -0.2493 0.02261 0.02247 -0.2493 0.02261 0.02247 -0.1117 0.004518
## 30 0.9965 -0.1593 0.02307 0.02302 -0.07966 0.02303 0.02302 -0.03559 0.004595
## 31 0.9966 0.1453 0.02251 0.02247 0.1372 0.02251 0.02247 0.06151 0.004518
## 32 0.9965 0.2505 0.02316 0.02302 0.1031 0.02304 0.02302 0.04607 0.004595
## 33 0.9966 0.3043 0.02268 0.02247 0.2963 0.02267 0.02247 0.1327 0.004518
## 34 0.9965 0.3411 0.02328 0.02302 0.1824 0.02309 0.02302 0.08147 0.004595
## 35 0.9966 0.08855 0.02248 0.02247 0.07970 0.02248 0.02247 0.03573 0.004518
## 36 0.9965 0.2731 0.02319 0.02302 0.1024 0.02304 0.02302 0.04575 0.004595
## 37 0.9966 0.06658 0.02248 0.02247 -0.04993 0.02247 0.02247 -0.02239 0.004518
## 38 0.9965 0.1938 0.02310 0.02302 -0.08882 0.02303 0.02302 -0.03968 0.004595
## 39 0.9966 0.3116 0.02269 0.02247 0.1904 0.02255 0.02247 0.08534 0.004518
## 40 0.9965 0.1861 0.02310 0.02302 -0.1100 0.02304 0.02302 -0.04913 0.004595
## 41 0.9966 0.1569 0.02252 0.02247 0.03488 0.02247 0.02247 0.01564 0.004518
## 42 0.9965 0.2726 0.02319 0.02302 -0.02556 0.02302 0.02302 -0.01142 0.004595
## h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <chr> <dbl>
## 1 221.3 221.3 1 eta 1.303
## 2 217.6 217.6 1 eta 1.311
## 3 221.3 221.3 1 eta 1.303
## 4 217.6 217.6 1 eta 1.311
## 5 221.3 221.3 1 eta 1.303
## 6 217.6 217.6 1 eta 1.311
## 7 221.3 221.3 1 eta 1.303
## 8 217.6 217.6 1 eta 1.311
## 9 221.3 221.3 1 eta 1.303
## 10 217.6 217.6 1 eta 1.311
## 11 221.3 221.3 1 eta 1.303
## 12 217.6 217.6 1 eta 1.311
## 13 221.3 221.3 1 eta 1.303
## 14 217.6 217.6 1 eta 1.311
## 15 221.3 221.3 1 eta 1.303
## 16 217.6 217.6 1 eta 1.311
## 17 221.3 221.3 1 eta 1.303
## 18 217.6 217.6 1 eta 1.311
## 19 221.3 221.3 1 eta 1.303
## 20 217.6 217.6 1 eta 1.311
## 21 221.3 221.3 1 eta 1.303
## 22 217.6 217.6 1 eta 1.311
## 23 221.3 221.3 1 eta 1.303
## 24 217.6 217.6 1 eta 1.311
## 25 221.3 221.3 1 eta 1.303
## 26 217.6 217.6 1 eta 1.311
## 27 221.3 221.3 1 eta 1.303
## 28 217.6 217.6 1 eta 1.311
## 29 221.3 221.3 1 eta 1.303
## 30 217.6 217.6 1 eta 1.311
## 31 221.3 221.3 1 eta 1.303
## 32 217.6 217.6 1 eta 1.311
## 33 221.3 221.3 1 eta 1.303
## 34 217.6 217.6 1 eta 1.311
## 35 221.3 221.3 1 eta 1.303
## 36 217.6 217.6 1 eta 1.311
## 37 221.3 221.3 1 eta 1.303
## 38 217.6 217.6 1 eta 1.311
## 39 221.3 221.3 1 eta 1.303
## 40 217.6 217.6 1 eta 1.311
## 41 221.3 221.3 1 eta 1.303
## 42 217.6 217.6 1 eta 1.311
## vary_id
## <chr>
## 1 ASI alcohol severity/3m/Relapse Prevention Training
## 2 ASI alcohol severity/3m/Seeking Safety
## 3 ASI alcohol severity/6m/Relapse Prevention Training
## 4 ASI alcohol severity/6m/Seeking Safety
## 5 ASI alcohol severity/Post/Relapse Prevention Training
## 6 ASI alcohol severity/Post/Seeking Safety
## 7 ASI drug severity/3m/Relapse Prevention Training
## 8 ASI drug severity/3m/Seeking Safety
## 9 ASI drug severity/6m/Relapse Prevention Training
## 10 ASI drug severity/6m/Seeking Safety
## 11 ASI drug severity/Post/Relapse Prevention Training
## 12 ASI drug severity/Post/Seeking Safety
## 13 BDI-II/3m/Relapse Prevention Training
## 14 BDI-II/3m/Seeking Safety
## 15 BDI-II/6m/Relapse Prevention Training
## 16 BDI-II/6m/Seeking Safety
## 17 BDI-II/Post/Relapse Prevention Training
## 18 BDI-II/Post/Seeking Safety
## 19 DERS/3m/Relapse Prevention Training
## 20 DERS/3m/Seeking Safety
## 21 DERS/6m/Relapse Prevention Training
## 22 DERS/6m/Seeking Safety
## 23 DERS/Post/Relapse Prevention Training
## 24 DERS/Post/Seeking Safety
## 25 Drug and alcohol free days/3m/Relapse Prevention Training
## 26 Drug and alcohol free days/3m/Seeking Safety
## 27 Drug and alcohol free days/6m/Relapse Prevention Training
## 28 Drug and alcohol free days/6m/Seeking Safety
## 29 Drug and alcohol free days/Post/Relapse Prevention Training
## 30 Drug and alcohol free days/Post/Seeking Safety
## 31 PDS/3m/Relapse Prevention Training
## 32 PDS/3m/Seeking Safety
## 33 PDS/6m/Relapse Prevention Training
## 34 PDS/6m/Seeking Safety
## 35 PDS/Post/Relapse Prevention Training
## 36 PDS/Post/Seeking Safety
## 37 PSS-I/3m/Relapse Prevention Training
## 38 PSS-I/3m/Seeking Safety
## 39 PSS-I/6m/Relapse Prevention Training
## 40 PSS-I/6m/Seeking Safety
## 41 PSS-I/Post/Relapse Prevention Training
## 42 PSS-I/Post/Seeking Safety
Somers2017_est <-
tibble(
study = "Somers et al. 2017",
outcome = c(
"Physical CIS",
"Psychological CIS",
"CSI",
"GAIN-SPS",
"QOL20"
),
analysis_plan = c(
"Social functioning (degree of impairment)",
"Social functioning (degree of impairment)",
"All mental health outcomes",
"Alcohol and drug abuse/misuse",
"Wellbeing and Quality of Life"
),
analysis = "ITT",
effect_size = "SMD",
sd_used = "Pooled posttest SDs",
main_es_method = "Raw diff-in-diffs",
N_start_t = 90,
N_start_c = 100,
N_t = N_start_t,
N_c = N_start_c,
N_total = N_t + N_c,
df_ind = N_total,
m_pre_t = c(2.1, 10.61, 37.12, 2.39, 72.61),
m_pre_c = c(1.83, 11.1, 40.25, 2.29, 74.72),
sd_pre_t = c(1.75, 3.68, 12.91, 1.94, 21.69),
sd_pre_c = c(1.70, 3.19, 12.49, 1.92, 21.43),
m_post_t = c(2.82, 14.66, 26.25, 1.34, 91.80),
m_post_c = c(2.07, 12.62, 27.7, 1, 87.80),
sd_post_t = c(1.90, 3.70, 10.98, 1.67, 24.55),
sd_post_c = c(1.79, 3.70, 11.80, 1.57, 22.71),
m_diff_t = c(0.72, 4.05, -10.87, -1.05, 19.19),
cil_m_diff_t = c(0.32, 3.15, -13.42, -1.51, 14.34),
ciu_m_diff_t = c(1.11, 4.94, -8.32, -0.59, 24.05),
sd_diff_t = sqrt(N_t) * (ciu_m_diff_t - cil_m_diff_t)/3.92,
m_diff_c = c(0.24, 1.52, -12.55, -1.29, 13.09),
cil_m_diff_c = c(-0.15, 0.63, -15.31, -1.71, 8.01),
ciu_m_diff_c = c(0.64, 2.40, -9.78, -0.88, 18.16),
sd_diff_c = sqrt(N_c) * (ciu_m_diff_c - cil_m_diff_c)/3.92,
) |>
mutate(
r_t = (sd_pre_t^2 + sd_post_t^2 - sd_diff_t^2)/(2*sd_pre_t*sd_post_t),
z_t = 0.5 * log( (1+r_t)/(1-r_t) ),
v_t = 1/(N_t-3),
w_t = 1/v_t,
r_c = (sd_pre_c^2 + sd_post_c^2 - sd_diff_c^2)/(2*sd_pre_c*sd_post_c),
z_c = 0.5 * log( (1+r_c)/(1-r_c) ),
v_c = 1/(N_c-3),
w_c = 1/v_c,
mean_z = (w_t*z_t + w_c*z_c)/(w_t + w_c),
ppcor = (exp(2*mean_z)-1)/(exp(2*mean_z)+1),
ppcor_method = "Calculated from study results",
m_post = if_else(str_detect(outcome, "CIS|QOL"), (m_post_t - m_post_c), (m_post_t - m_post_c)*-1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For YMRS and HAM-D lower scores are beneficial why these are reverted
m_diff_t = if_else(str_detect(outcome, "CIS|QOL"), (m_post_t - m_pre_t), (m_post_t - m_pre_t)*-1),
m_diff_c = if_else(str_detect(outcome, "CIS|QOL"), (m_post_c - m_pre_c), (m_post_c - m_pre_c)*-1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Could not find any estimate
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD
),
vary_id = outcome
) |>
ungroup(); Somers2017_est
## # A tibble: 5 × 77
## study outcome analysis_plan
## <chr> <chr> <chr>
## 1 Somers et al. 2017 Physical CIS Social functioning (degree of impairment)
## 2 Somers et al. 2017 Psychological CIS Social functioning (degree of impairment)
## 3 Somers et al. 2017 CSI All mental health outcomes
## 4 Somers et al. 2017 GAIN-SPS Alcohol and drug abuse/misuse
## 5 Somers et al. 2017 QOL20 Wellbeing and Quality of Life
## analysis effect_size sd_used main_es_method N_start_t N_start_c
## <chr> <chr> <chr> <chr> <dbl> <dbl>
## 1 ITT SMD Pooled posttest SDs Raw diff-in-diffs 90 100
## 2 ITT SMD Pooled posttest SDs Raw diff-in-diffs 90 100
## 3 ITT SMD Pooled posttest SDs Raw diff-in-diffs 90 100
## 4 ITT SMD Pooled posttest SDs Raw diff-in-diffs 90 100
## 5 ITT SMD Pooled posttest SDs Raw diff-in-diffs 90 100
## N_t N_c N_total df_ind m_pre_t m_pre_c sd_pre_t sd_pre_c m_post_t m_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 90 100 190 190 2.1 1.83 1.75 1.7 2.82 2.07
## 2 90 100 190 190 10.61 11.1 3.68 3.19 14.66 12.62
## 3 90 100 190 190 37.12 40.25 12.91 12.49 26.25 27.7
## 4 90 100 190 190 2.39 2.29 1.94 1.92 1.34 1
## 5 90 100 190 190 72.61 74.72 21.69 21.43 91.8 87.8
## sd_post_t sd_post_c m_diff_t cil_m_diff_t ciu_m_diff_t sd_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.9 1.79 0.72 0.32 1.11 1.912 0.2400
## 2 3.7 3.7 4.05 3.15 4.94 4.332 1.52
## 3 10.98 11.8 10.87 -13.42 -8.32 12.34 12.55
## 4 1.67 1.57 1.05 -1.51 -0.59 2.227 1.29
## 5 24.55 22.71 19.19 14.34 24.05 23.50 13.08
## cil_m_diff_c ciu_m_diff_c sd_diff_c r_t z_t v_t w_t r_c z_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.15 0.64 2.015 0.4537 0.4894 0.01149 87 0.3340 0.3473
## 2 0.63 2.4 4.515 0.3109 0.3215 0.01149 87 0.1473 0.1484
## 3 -15.31 -9.78 14.11 0.4758 0.5175 0.01149 87 0.3265 0.3389
## 4 -1.71 -0.88 2.117 0.2462 0.2513 0.01149 87 0.2767 0.2841
## 5 8.01 18.16 25.89 0.4892 0.5350 0.01149 87 0.3129 0.3237
## v_c w_c mean_z ppcor ppcor_method m_post sd_pool
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <dbl>
## 1 0.01031 97 0.4145 0.3923 Calculated from study results 0.75 1.843
## 2 0.01031 97 0.2303 0.2263 Calculated from study results 2.04 3.7
## 3 0.01031 97 0.4233 0.3997 Calculated from study results 1.45 11.42
## 4 0.01031 97 0.2686 0.2623 Calculated from study results -0.34 1.618
## 5 0.01031 97 0.4236 0.4000 Calculated from study results 4 23.60
## d_post vd_post Wd_post J g_post vg_post Wg_post d_DD vd_DD Wd_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.4070 0.02155 0.02111 0.9960 0.4054 0.02154 0.02111 0.2605 0.02584 0.02566
## 2 0.5514 0.02191 0.02111 0.9960 0.5492 0.02190 0.02111 0.6838 0.03390 0.03267
## 3 0.1270 0.02115 0.02111 0.9960 0.1265 0.02115 0.02111 -0.1471 0.02540 0.02534
## 4 -0.2101 0.02123 0.02111 0.9960 -0.2093 0.02123 0.02111 -0.1483 0.03120 0.03115
## 5 0.1695 0.02119 0.02111 0.9960 0.1688 0.02119 0.02111 0.2589 0.02551 0.02533
## g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc icc_type n_covariates
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <chr> <dbl>
## 1 0.2594 0.02584 0.02566 8 Imputed 0.1 Imputed 1
## 2 0.6811 0.03389 0.03267 8 Imputed 0.1 Imputed 1
## 3 -0.1465 0.02540 0.02534 8 Imputed 0.1 Imputed 1
## 4 -0.1477 0.03120 0.03115 8 Imputed 0.1 Imputed 1
## 5 0.2579 0.02551 0.02533 8 Imputed 0.1 Imputed 1
## gamma_sqrt df_adj omega gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.971 181.3 0.9959 0.3935 0.02831 0.02789 0.2519 0.03407 0.03390
## 2 0.971 181.3 0.9959 0.5331 0.02867 0.02789 0.6612 0.04436 0.04315
## 3 0.971 181.3 0.9959 0.1228 0.02793 0.02789 -0.1423 0.03354 0.03348
## 4 0.971 181.3 0.9959 -0.2032 0.02800 0.02789 -0.1434 0.04120 0.04114
## 5 0.971 181.3 0.9959 0.1639 0.02796 0.02789 0.2504 0.03364 0.03347
## hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD adj_value_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.1015 0.005516 181.3 181.3 1 eta 1.321
## 2 0.2353 0.005516 181.3 181.3 1 eta 1.321
## 3 -0.05773 0.005516 181.3 181.3 1 eta 1.321
## 4 -0.05250 0.005516 181.3 181.3 1 eta 1.321
## 5 0.1016 0.005516 181.3 181.3 1 eta 1.321
## vary_id
## <chr>
## 1 Physical CIS
## 2 Psychological CIS
## 3 CSI
## 4 GAIN-SPS
## 5 QOL20
Tjaden2021 <- tibble(
group = rep(c("Ressource group + FACT", #Ressource group
"FACT"), #Control group
each = 1, 8),
outcome = rep(c("NEL", # Netherlands Empowerment List
"BSI", # Brief Symptom Inventory
"MANSA", # Manchester Short assesment of Quality of Life
"GAF"), # Global Assesment of functioning
each = 2, 2),
timing = rep(c("9m", "18m"), each = 8),
N_start = rep(c(
80, 78,
80, 78,
80, 78,
80, 78),
each = 1, 2),
N = c(
# 9 months
70, 67,
70, 67,
70, 67,
70, 67,
# 18 months
63, 58,
63, 58,
63, 58,
63, 58),
m_pre = rep(c(
3.32, 3.34,
2.11, 2.15,
4.12, 4.26,
47.91, 51.45),
each = 1,2),
sd_pre = rep(c(
0.51, 0.52,
0.72, 0.85,
0.88, 0.85,
10.22, 10.58),
each = 1,2),
m_post = c(
# 9 months
3.55, 3.34,
1.98, 1.98,
4.49, 4.34,
53.8, 54.03,
# 18 months
3.77, 3.38,
1.92, 1.91,
4.67, 4.48,
58.33, 54.84),
sd_post = c(
# 9 months
0.53, 0.62,
0.86, 0.81,
0.74, 0.90,
10.16, 11.26,
# 18 months
0.57, 0.70,
0.82, 0.76,
0.74, 1.04,
11.76, 13.43)
)
# Turning data into wide format
Tjaden2021_wide <- Tjaden2021 |>
mutate(group = case_match(group, "Ressource group + FACT" ~ "t", "FACT" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) #|>
# arrange(outcome, desc(timing))
Tjaden2021_est <- Tjaden2021_wide |>
# Based on the degrees of freedom value reported in Druss et al. 2018 table 2 and 3
mutate(
analysis_plan = case_when(
str_detect(outcome, "BSI") ~ "All mental health outcomes",
str_detect(outcome, "GAF") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "MANSA") ~ "Wellbeing and Quality of Life",
str_detect(outcome, "NEL") ~ "Hope, Empowerment & Self-efficacy",
.default = NA_character_
),
# Effect sizes are acorss different time
# d = c(
# rep(c(NA_real_), each = 4,1),
# c(0.54,
# 0.25,
# 0.07,
# 0.30)),
study = "Tjaden et al. 2021",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
)|>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# For PANSS: reverted
m_post = if_else(outcome %in% c("BSI"),
(m_post_t - m_post_c)*-1,
m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For all scores: Lower is beneficial
m_diff_t = if_else(outcome %in% c("BSI"), (m_post_t - m_pre_t)*-1, m_post_t - m_post_c),
m_diff_c = if_else(outcome %in% c("BSI"), (m_post_c - m_pre_c)*-1,m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Group size is imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD),
gt_DD_pop = if_else(
str_detect(outcome, "GAF"),
omega * ((m_diff_t - m_diff_c)/GAF_pop_res$sd_population_GAF) * gamma_sqrt,
NA_real_
),
# Calculated from Eq. 28 (Fitzgerald & Tipton, 2024)
vgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD) + g_DD^2/(2*GAF_pop_res$df_pop),
NA_real_
),
Wgt_DD_pop = if_else(
str_detect(outcome, "GAF"),
GAF_pop_res$WaboveT * (2*(1-ppcor) * (1/N_t + 1/N_c) * adj_value_DD),
NA_real_
),
vary_id = paste0(outcome, "/", timing)
) |>
ungroup(); Tjaden2021_est
## # A tibble: 8 × 65
## outcome timing N_start_t N_start_c N_t N_c m_pre_t m_pre_c sd_pre_t
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 NEL 9m 80 78 70 67 3.32 3.34 0.51
## 2 BSI 9m 80 78 70 67 2.11 2.15 0.72
## 3 MANSA 9m 80 78 70 67 4.12 4.26 0.88
## 4 GAF 9m 80 78 70 67 47.91 51.45 10.22
## 5 NEL 18m 80 78 63 58 3.32 3.34 0.51
## 6 BSI 18m 80 78 63 58 2.11 2.15 0.72
## 7 MANSA 18m 80 78 63 58 4.12 4.26 0.88
## 8 GAF 18m 80 78 63 58 47.91 51.45 10.22
## sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.52 3.55 3.34 0.53 0.62
## 2 0.85 1.98 1.98 0.86 0.81
## 3 0.85 4.49 4.34 0.74 0.9
## 4 10.58 53.8 54.03 10.16 11.26
## 5 0.52 3.77 3.38 0.57 0.7
## 6 0.85 1.92 1.91 0.82 0.76
## 7 0.85 4.67 4.48 0.74 1.04
## 8 10.58 58.33 54.84 11.76 13.43
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 Hope, Empowerment & Self-efficacy Tjaden et al. 2021 SMD
## 2 All mental health outcomes Tjaden et al. 2021 SMD
## 3 Wellbeing and Quality of Life Tjaden et al. 2021 SMD
## 4 Social functioning (degree of impairment) Tjaden et al. 2021 SMD
## 5 Hope, Empowerment & Self-efficacy Tjaden et al. 2021 SMD
## 6 All mental health outcomes Tjaden et al. 2021 SMD
## 7 Wellbeing and Quality of Life Tjaden et al. 2021 SMD
## 8 Social functioning (degree of impairment) Tjaden et al. 2021 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind
## <chr> <chr> <dbl> <chr> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 137 137
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 137 137
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 137 137
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 137 137
## 5 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 121 121
## 6 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 121 121
## 7 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 121 121
## 8 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 121 121
## m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.21 0.5758 0.3647 0.02970 0.02921 0.9945 0.3627 0.02969 0.02921
## 2 0 0.8359 0 0.02921 0.02921 0.9945 0 0.02921 0.02921
## 3 0.1500 0.8221 0.1825 0.02933 0.02921 0.9945 0.1815 0.02933 0.02921
## 4 -0.2300 10.71 -0.02147 0.02921 0.02921 0.9945 -0.02135 0.02921 0.02921
## 5 0.39 0.6356 0.6136 0.03467 0.03311 0.9938 0.6098 0.03465 0.03311
## 6 -0.01000 0.7918 -0.01263 0.03312 0.03311 0.9938 -0.01255 0.03312 0.03311
## 7 0.1900 0.8963 0.2120 0.03330 0.03311 0.9938 0.2107 0.03330 0.03311
## 8 3.490 12.59 0.2773 0.03343 0.03311 0.9938 0.2755 0.03343 0.03311
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.21 0 0.3647 0.02970 0.02921 0.3627 0.02969 0.02921
## 2 0.1300 0.17 -0.04785 0.02922 0.02921 -0.04759 0.02922 0.02921
## 3 0.1500 0.08000 0.08515 0.02924 0.02921 0.08468 0.02924 0.02921
## 4 -0.2300 2.580 -0.2623 0.02946 0.02921 -0.2609 0.02946 0.02921
## 5 0.39 0.04000 0.5507 0.03437 0.03311 0.5472 0.03435 0.03311
## 6 0.19 0.24 -0.06315 0.03313 0.03311 -0.06275 0.03313 0.03311
## 7 0.1900 0.2200 -0.03347 0.03312 0.03311 -0.03326 0.03312 0.03311
## 8 3.490 3.39 0.007944 0.03311 0.03311 0.007895 0.03311 0.03311
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 8 Imputed 0.1 Imputed 1 0.973 130.0 0.9942
## 2 8 Imputed 0.1 Imputed 1 0.973 130.0 0.9942
## 3 8 Imputed 0.1 Imputed 1 0.973 130.0 0.9942
## 4 8 Imputed 0.1 Imputed 1 0.973 130.0 0.9942
## 5 8 Imputed 0.1 Imputed 1 0.973 114.5 0.9934
## 6 8 Imputed 0.1 Imputed 1 0.973 114.5 0.9934
## 7 8 Imputed 0.1 Imputed 1 0.973 114.5 0.9934
## 8 8 Imputed 0.1 Imputed 1 0.973 114.5 0.9934
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.3528 0.03819 0.03771 0.3528 0.03819 0.03771 0.1590 0.007694 130.0
## 2 0 0.03771 0.03771 -0.04629 0.03772 0.03771 -0.02091 0.007694 130.0
## 3 0.1765 0.03783 0.03771 0.08237 0.03774 0.03771 0.03720 0.007694 130.0
## 4 -0.02077 0.03771 0.03771 -0.2538 0.03796 0.03771 -0.1145 0.007694 130.0
## 5 0.5931 0.04402 0.04249 0.5323 0.04372 0.04249 0.2401 0.008731 114.5
## 6 -0.01221 0.04249 0.04249 -0.06104 0.04250 0.04249 -0.02767 0.008731 114.5
## 7 0.2049 0.04267 0.04249 -0.03235 0.04249 0.04249 -0.01467 0.008731 114.5
## 8 0.2680 0.04280 0.04249 0.007679 0.04249 0.04249 0.003481 0.008731 114.5
## df_DD n_covariates_DD adj_fct_DD adj_value_DD gt_DD_pop vgt_DD_pop Wgt_DD_pop
## <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 130.0 1 eta 1.291 NA NA NA
## 2 130.0 1 eta 1.291 NA NA NA
## 3 130.0 1 eta 1.291 NA NA NA
## 4 130.0 1 eta 1.291 -0.2146 0.03659 0.03644
## 5 114.5 1 eta 1.283 NA NA NA
## 6 114.5 1 eta 1.283 NA NA NA
## 7 114.5 1 eta 1.283 NA NA NA
## 8 114.5 1 eta 1.283 0.007631 0.04105 0.04105
## vary_id
## <chr>
## 1 NEL/9m
## 2 BSI/9m
## 3 MANSA/9m
## 4 GAF/9m
## 5 NEL/18m
## 6 BSI/18m
## 7 MANSA/18m
## 8 GAF/18m
# Data from Table 3 and Table 4 (p. 4) containing means, standard deviation. It also contains
# difference Morris' d and p
Valiente2022 <- tibble(
group = rep(c("Multicomponent PPI", # Intervention
"Treatment as usual"), # Control
each = 1,16),
outcome = rep(c(
# Table 3
"SPWB Autonomy", #Scales of Psychological Well-Being (SPWB)
"SPWB Positive_relationship",
"SPWB Self_acceptance",
"SPWB Enviormental mastery",
"SPWB Purpose_in_life",
"SPWB Personal_Growth",
"SWLS", # Satisfaction With Life Scale (SWLS)
# Table 4
"Somatization", # Symptom checklist-90-Revised (SCL-90-R)
"Obsessive–compulsive",
"Interpersonal sensibility",
"Depression",
"Anxiety",
"Hostility",
"Phobic anxiety",
"Paranoid ideation",
"Psychoticism"
),
each = 2,1),
N_start = rep(c(71, 70), n_distinct(outcome)),
N = rep(c(52,61),
each = 1,16),
m_pre = c(
# Table 3
19.5, 20.1,
34.7, 33.9,
29.9, 31.6,
30.6, 31.4,
34.4, 34.4,
35.3, 35.7,
17.4, 18.2,
# Table 4
1.00, 1.02,
1.66, 1.62,
1.42, 1.41,
1.51, 1.47,
1.12, 1.31,
0.75, 0.63,
0.89, 1.09,
1.15, 1.15,
1.14, 0.99
),
sd_pre = c(
# Table 3
4.4, 4.2,
8.0, 7.5,
8.7, 7.8,
7.8, 7.1,
7.7, 6.6,
7.4, 7.2,
7.1, 6.8,
# Table 4
0.83, 0.81,
0.87, 0.93,
0.81, 0.95,
0.87, 0.89,
0.82, 0.97,
0.83, 0.80,
0.77, 1.01,
0.86, 0.86,
0.82, 0.83
),
m_post = c(
# Table 3
19.9, 19.7,
35.7, 34.4,
31.7, 31.1,
32.7, 30.8,
34.9, 34.2,
35.5, 35.5,
19.0, 19.2,
# Table 4
0.90, 0.96,
1.50, 1.48,
1.28, 1.27,
1.30, 1.40,
1.07, 1.14,
0.71, 0.61,
0.91, 1.07,
1.18, 1.21,
0.99, 0.98
),
sd_post = c(
# Table 3
3.4, 4.2,
7.1, 7.6,
7.5, 7.8,
7.5, 7.3,
6.9, 5.9,
6.8, 6.8,
6.6, 6.8,
# Table 4
0.82, 0.84,
0.86, 0.96,
0.79, 0.89,
0.80, 0.94,
0.84, 0.91,
0.76, 0.79,
0.80, 0.97,
0.90, 0.87,
0.85, 0.86
)
)
# Making the tibble wide
Valiente2022_wide <-
Valiente2022 |>
mutate (group = case_match(
group, "Multicomponent PPI" ~ "t", "Treatment as usual" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
)
# Effect sizes: Estimating G and D (pre-post test) (Not finished yest)
Valiente2022_est <-
Valiente2022_wide |>
mutate(
analysis_plan = rep(c(
"Wellbeing and Quality of Life",
"Wellbeing and Quality of Life",
"All mental health outcomes"
), c(6,1,9)),
study = "Valiente et al. 2022",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed"
)|>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
# The outcome SCL-90-R reverted because lower score is beneficial
m_post = if_else(analysis_plan != "All mental health outcomes", m_post_t - m_post_c,
(m_post_t - m_post_c) * -1),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For BSI: Lower is beneficial
m_diff_t = if_else(analysis_plan != "All mental health outcomes", m_post_t - m_post_c, (m_post_t - m_pre_t)*-1),
m_diff_c = if_else(analysis_plan != "All mental health outcomes", m_post_c - m_pre_c, (m_post_c - m_pre_c)*-1),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Group size is imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD),
vary_id = outcome
) |>
ungroup(); Valiente2022_est
## # A tibble: 16 × 61
## outcome N_start_t N_start_c N_t N_c m_pre_t m_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SPWB Autonomy 71 70 52 61 19.5 20.1
## 2 SPWB Positive_relationship 71 70 52 61 34.7 33.9
## 3 SPWB Self_acceptance 71 70 52 61 29.9 31.6
## 4 SPWB Enviormental mastery 71 70 52 61 30.6 31.4
## 5 SPWB Purpose_in_life 71 70 52 61 34.4 34.4
## 6 SPWB Personal_Growth 71 70 52 61 35.3 35.7
## 7 SWLS 71 70 52 61 17.4 18.2
## 8 Somatization 71 70 52 61 1 1.02
## 9 Obsessive–compulsive 71 70 52 61 1.66 1.62
## 10 Interpersonal sensibility 71 70 52 61 1.42 1.41
## 11 Depression 71 70 52 61 1.51 1.47
## 12 Anxiety 71 70 52 61 1.12 1.31
## 13 Hostility 71 70 52 61 0.75 0.63
## 14 Phobic anxiety 71 70 52 61 0.89 1.09
## 15 Paranoid ideation 71 70 52 61 1.15 1.15
## 16 Psychoticism 71 70 52 61 1.14 0.99
## sd_pre_t sd_pre_c m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.4 4.2 19.9 19.7 3.4 4.2
## 2 8 7.5 35.7 34.4 7.1 7.6
## 3 8.7 7.8 31.7 31.1 7.5 7.8
## 4 7.8 7.1 32.7 30.8 7.5 7.3
## 5 7.7 6.6 34.9 34.2 6.9 5.9
## 6 7.4 7.2 35.5 35.5 6.8 6.8
## 7 7.1 6.8 19 19.2 6.6 6.8
## 8 0.83 0.81 0.9 0.96 0.82 0.84
## 9 0.87 0.93 1.5 1.48 0.86 0.96
## 10 0.81 0.95 1.28 1.27 0.79 0.89
## 11 0.87 0.89 1.3 1.4 0.8 0.94
## 12 0.82 0.97 1.07 1.14 0.84 0.91
## 13 0.83 0.8 0.71 0.61 0.76 0.79
## 14 0.77 1.01 0.91 1.07 0.8 0.97
## 15 0.86 0.86 1.18 1.21 0.9 0.87
## 16 0.82 0.83 0.99 0.98 0.85 0.86
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 2 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 3 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 4 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 5 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 6 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 7 Wellbeing and Quality of Life Valiente et al. 2022 SMD
## 8 All mental health outcomes Valiente et al. 2022 SMD
## 9 All mental health outcomes Valiente et al. 2022 SMD
## 10 All mental health outcomes Valiente et al. 2022 SMD
## 11 All mental health outcomes Valiente et al. 2022 SMD
## 12 All mental health outcomes Valiente et al. 2022 SMD
## 13 All mental health outcomes Valiente et al. 2022 SMD
## 14 All mental health outcomes Valiente et al. 2022 SMD
## 15 All mental health outcomes Valiente et al. 2022 SMD
## 16 All mental health outcomes Valiente et al. 2022 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind
## <chr> <chr> <dbl> <chr> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 5 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 6 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 7 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 8 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 9 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 10 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 11 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 12 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 13 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 14 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 15 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## 16 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 113 113
## m_post sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.2000 3.853 0.05191 0.03564 0.03562 0.9933 0.05156 0.03564 0.03562
## 2 1.300 7.374 0.1763 0.03576 0.03562 0.9933 0.1751 0.03576 0.03562
## 3 0.6000 7.664 0.07829 0.03565 0.03562 0.9933 0.07777 0.03565 0.03562
## 4 1.900 7.393 0.2570 0.03592 0.03562 0.9933 0.2553 0.03591 0.03562
## 5 0.7000 6.379 0.1097 0.03568 0.03562 0.9933 0.1090 0.03568 0.03562
## 6 0 6.8 0 0.03562 0.03562 0.9933 0 0.03562 0.03562
## 7 -0.2000 6.709 -0.02981 0.03563 0.03562 0.9933 -0.02961 0.03563 0.03562
## 8 0.06000 0.8309 0.07221 0.03565 0.03562 0.9933 0.07173 0.03565 0.03562
## 9 -0.02000 0.9154 -0.02185 0.03563 0.03562 0.9933 -0.02170 0.03563 0.03562
## 10 -0.01000 0.8455 -0.01183 0.03562 0.03562 0.9933 -0.01175 0.03562 0.03562
## 11 0.1000 0.8785 0.1138 0.03568 0.03562 0.9933 0.1131 0.03568 0.03562
## 12 0.07000 0.8785 0.07968 0.03565 0.03562 0.9933 0.07915 0.03565 0.03562
## 13 -0.1 0.7764 -0.1288 0.03570 0.03562 0.9933 -0.1279 0.03570 0.03562
## 14 0.16 0.8959 0.1786 0.03577 0.03562 0.9933 0.1774 0.03576 0.03562
## 15 0.03000 0.8839 0.03394 0.03563 0.03562 0.9933 0.03371 0.03563 0.03562
## 16 -0.01000 0.8554 -0.01169 0.03562 0.03562 0.9933 -0.01161 0.03562 0.03562
## m_diff_t m_diff_c d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.2000 -0.4000 0.1557 0.03573 0.03562 0.1547 0.03573 0.03562
## 2 1.300 0.5 0.1085 0.03568 0.03562 0.1078 0.03568 0.03562
## 3 0.6000 -0.5 0.1435 0.03572 0.03562 0.1426 0.03571 0.03562
## 4 1.900 -0.6000 0.3382 0.03613 0.03562 0.3359 0.03612 0.03562
## 5 0.7000 -0.2000 0.1411 0.03571 0.03562 0.1402 0.03571 0.03562
## 6 0 -0.2000 0.02941 0.03563 0.03562 0.02922 0.03563 0.03562
## 7 -0.2000 1 -0.1789 0.03577 0.03562 -0.1777 0.03576 0.03562
## 8 0.1 0.06000 0.04814 0.03563 0.03562 0.04782 0.03563 0.03562
## 9 0.1600 0.1400 0.02185 0.03563 0.03562 0.02170 0.03563 0.03562
## 10 0.1400 0.1400 0 0.03562 0.03562 0 0.03562 0.03562
## 11 0.21 0.07000 0.1594 0.03574 0.03562 0.1583 0.03574 0.03562
## 12 0.05000 0.1700 -0.1366 0.03571 0.03562 -0.1357 0.03571 0.03562
## 13 0.04000 0.02000 0.02576 0.03563 0.03562 0.02559 0.03563 0.03562
## 14 -0.02000 0.02000 -0.04465 0.03563 0.03562 -0.04435 0.03563 0.03562
## 15 -0.03000 -0.06000 0.03394 0.03563 0.03562 0.03371 0.03563 0.03562
## 16 0.1500 0.01000 0.1637 0.03574 0.03562 0.1626 0.03574 0.03562
## avg_cl_size avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <dbl> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 2 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 3 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 4 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 5 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 6 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 7 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 8 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 9 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 10 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 11 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 12 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 13 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 14 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 15 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## 16 8 Imputed 0.1 Imputed 1 0.969 107.3 0.9930
## gt_post vgt_post Wgt_post gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.04994 0.04746 0.04745 0.1498 0.04756 0.04745 0.06637 0.009316 107.3
## 2 0.1696 0.04759 0.04745 0.1044 0.04750 0.04745 0.04624 0.009316 107.3
## 3 0.07533 0.04748 0.04745 0.1381 0.04754 0.04745 0.06118 0.009316 107.3
## 4 0.2473 0.04774 0.04745 0.3254 0.04794 0.04745 0.1439 0.009316 107.3
## 5 0.1056 0.04750 0.04745 0.1358 0.04754 0.04745 0.06014 0.009316 107.3
## 6 0 0.04745 0.04745 0.02830 0.04746 0.04745 0.01254 0.009316 107.3
## 7 -0.02868 0.04746 0.04745 -0.1721 0.04759 0.04745 -0.07622 0.009316 107.3
## 8 0.06948 0.04747 0.04745 0.04632 0.04746 0.04745 0.02052 0.009316 107.3
## 9 -0.02102 0.04745 0.04745 0.02102 0.04745 0.04745 0.009315 0.009316 107.3
## 10 -0.01138 0.04745 0.04745 0 0.04745 0.04745 0 0.009316 107.3
## 11 0.1095 0.04751 0.04745 0.1533 0.04756 0.04745 0.06792 0.009316 107.3
## 12 0.07667 0.04748 0.04745 -0.1314 0.04753 0.04745 -0.05822 0.009316 107.3
## 13 -0.1239 0.04752 0.04745 0.02479 0.04745 0.04745 0.01098 0.009316 107.3
## 14 0.1718 0.04759 0.04745 -0.04296 0.04746 0.04745 -0.01903 0.009316 107.3
## 15 0.03266 0.04746 0.04745 0.03266 0.04746 0.04745 0.01447 0.009316 107.3
## 16 -0.01125 0.04745 0.04745 0.1575 0.04757 0.04745 0.06975 0.009316 107.3
## df_DD n_covariates_DD adj_fct_DD adj_value_DD vary_id
## <dbl> <dbl> <chr> <dbl> <chr>
## 1 107.3 1 eta 1.332 SPWB Autonomy
## 2 107.3 1 eta 1.332 SPWB Positive_relationship
## 3 107.3 1 eta 1.332 SPWB Self_acceptance
## 4 107.3 1 eta 1.332 SPWB Enviormental mastery
## 5 107.3 1 eta 1.332 SPWB Purpose_in_life
## 6 107.3 1 eta 1.332 SPWB Personal_Growth
## 7 107.3 1 eta 1.332 SWLS
## 8 107.3 1 eta 1.332 Somatization
## 9 107.3 1 eta 1.332 Obsessive–compulsive
## 10 107.3 1 eta 1.332 Interpersonal sensibility
## 11 107.3 1 eta 1.332 Depression
## 12 107.3 1 eta 1.332 Anxiety
## 13 107.3 1 eta 1.332 Hostility
## 14 107.3 1 eta 1.332 Phobic anxiety
## 15 107.3 1 eta 1.332 Paranoid ideation
## 16 107.3 1 eta 1.332 Psychoticism
Volpe_2015 <- tibble(
# Taken from table 2, p. 19
outcome = rep(c(
"BPRS", # Brief Psychiatric Rating Scale
"PHQ-9", # Patient Health Questionnaire
"PSP", # Personal and Social Performance Scale
"DAS-II" # Disability Assessment Schedule 2.0
), each = 2, 1),
group = rep(c(
"Reading group",
"Control group"
), each = 1, 4),
N_start = rep(c(25)),
N = rep(c(21,20), each = 1, 4),
m_pre = c(
49.95, 51.2, # Brief Psychiatric Rating Scale
9.74, 9.9, # Patient Health Questionnaire
44.09, 46.2, # Personal and Social Performance Scale
2.64, 2.95 # Disability Assessment Schedule 2.0
),
sd_pre =c(
15.48, 17.75,
4.58, 4.35,
16.19, 18.23,
0.93, 0.94
),
m_post = c(
36.21, 41.2,
4.7, 5.66,
49.95, 47.25,
1.25, 2.13
),
sd_post = c(
17.43, 15.69,
2.78, 2.45,
15.53, 18.35,
0.5, 0.25
)
)
# Making the tibble into wideformat
Volpe2015_est <-
Volpe_2015 |>
mutate(group = case_match(group, "Reading group" ~ "t", "Control group" ~ "c")) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "BPRS") ~ "All mental health outcomes",
str_detect(outcome, "PHQ-9") ~ "All mental health outcomes/Depression",
str_detect(outcome, "PSP|DAS-II") ~ "Social functioning (degree of impairment)"),
study = "Volpe et al. 2015",
effect_size = "SMD",
sd_used = "Pooled posttest SD",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor = ppcor_imp,
ppcor_method = "Imputed",
# MANOVA estimates obtained from raw text on page 18 for between-group comparisons.
# But the effect-sizes seems wrong when using them.
# F_val = c(NA_real_,
# NA_real_,
# 7.29,
# 3.07),
# df1 = c(NA_real_,
# NA_real_,
# 1,
# 1),
# df2 = c(NA_real_,
# NA_real_,
# 39,
# 39),
# p_val_F = c(NA_real_,
# NA_real_,
# 0.008,
# 0.005
# ),
N_total = N_t + N_c,
N_total = N_t + N_c,
df_ind = N_total,
# For BPRS, PHQ-9, and DAs-II lower scores are beneficial why these is reverted
m_post = if_else(outcome != "PSP", (m_post_t - m_post_c)*-1, m_post_t - m_post_c),
sd_pool = sqrt(((N_t-1)*sd_post_t^2 + (N_c-1)*sd_post_c^2)/(N_t + N_c - 2)),
d_post = m_post/sd_pool,
vd_post = (1/N_t + 1/N_c) + d_post^2/(2*df_ind),
Wd_post = (1/N_t + 1/N_c),
J = 1 - 3/(4*df_ind-1),
g_post = J * d_post,
vg_post = (1/N_t + 1/N_c) + g_post^2/(2*df_ind),
Wg_post = Wd_post,
# For BPRS, PHQ-9, and DAs-II lower scores are beneficial why these is reverted
m_diff_t = if_else(outcome != "PSP", (m_post_t - m_pre_t)*-1, m_post_t - m_post_c),
m_diff_c = if_else(outcome != "PSP", (m_post_c - m_pre_c)*-1, m_post_c - m_pre_c),
d_DD = (m_diff_t - m_diff_c)/sd_pool,
vd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + d_DD^2/(2*df_ind),
Wd_DD = 2*(1-ppcor) * (1/N_t + 1/N_c),
g_DD = J * d_DD,
vg_DD = 2*(1-ppcor) * (1/N_t + 1/N_c) + g_DD^2/(2*df_ind),
Wg_DD = Wd_DD
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# Group size is imputed
avg_cl_size = grp_size_imp,
avg_cl_type = "Imputed",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
# Calculated via Eq. 7 (Hedges & Citkowicz, 2015)
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3/(4*df_adj-1),
# Cluster-adjusting g_post
gt_post = omega * d_post * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_post,
model = "posttest",
cluster_adj = FALSE,
add_name_to_vars = "_post",
vars = c(vgt_post, Wgt_post)
),
gt_DD = omega * d_DD * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_DD,
model = "DiD",
cluster_adj = FALSE,
prepost_cor = ppcor,
q = n_covariates,
add_name_to_vars = "_DD",
vars = -var_term1_DD),
vary_id = outcome
) |>
ungroup(); Volpe2015_est
## # A tibble: 4 × 61
## outcome N_start_t N_start_c N_t N_c m_pre_t m_pre_c sd_pre_t sd_pre_c
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BPRS 25 25 21 20 49.95 51.2 15.48 17.75
## 2 PHQ-9 25 25 21 20 9.74 9.9 4.58 4.35
## 3 PSP 25 25 21 20 44.09 46.2 16.19 18.23
## 4 DAS-II 25 25 21 20 2.64 2.95 0.93 0.94
## m_post_t m_post_c sd_post_t sd_post_c
## <dbl> <dbl> <dbl> <dbl>
## 1 36.21 41.2 17.43 15.69
## 2 4.7 5.66 2.78 2.45
## 3 49.95 47.25 15.53 18.35
## 4 1.25 2.13 0.5 0.25
## analysis_plan study effect_size
## <chr> <chr> <chr>
## 1 All mental health outcomes Volpe et al. 2015 SMD
## 2 All mental health outcomes/Depression Volpe et al. 2015 SMD
## 3 Social functioning (degree of impairment) Volpe et al. 2015 SMD
## 4 Social functioning (degree of impairment) Volpe et al. 2015 SMD
## sd_used main_es_method ppcor ppcor_method N_total df_ind m_post
## <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl>
## 1 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 41 41 4.99
## 2 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 41 41 0.96
## 3 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 41 41 2.700
## 4 Pooled posttest SD Raw diff-in-diffs 0.5 Imputed 41 41 0.88
## sd_pool d_post vd_post Wd_post J g_post vg_post Wg_post m_diff_t m_diff_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 16.61 0.3005 0.09872 0.09762 0.9816 0.2950 0.09868 0.09762 13.74 10
## 2 2.624 0.3658 0.09925 0.09762 0.9816 0.3591 0.09919 0.09762 5.04 4.24
## 3 16.96 0.1592 0.09793 0.09762 0.9816 0.1562 0.09792 0.09762 2.700 1.050
## 4 0.3983 2.209 0.1571 0.09762 0.9816 2.169 0.1550 0.09762 1.39 0.82
## d_DD vd_DD Wd_DD g_DD vg_DD Wg_DD avg_cl_size avg_cl_type icc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
## 1 0.2252 0.09824 0.09762 0.2211 0.09822 0.09762 8 Imputed 0.1
## 2 0.3048 0.09875 0.09762 0.2992 0.09871 0.09762 8 Imputed 0.1
## 3 0.09727 0.09773 0.09762 0.09548 0.09773 0.09762 8 Imputed 0.1
## 4 1.431 0.1226 0.09762 1.405 0.1217 0.09762 8 Imputed 0.1
## icc_type n_covariates gamma_sqrt df_adj omega gt_post vgt_post Wgt_post
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Imputed 1 0.966 37.89 0.9801 0.2845 0.1270 0.1259
## 2 Imputed 1 0.966 37.89 0.9801 0.3463 0.1275 0.1259
## 3 Imputed 1 0.966 37.89 0.9801 0.1507 0.1262 0.1259
## 4 Imputed 1 0.966 37.89 0.9801 2.092 0.1837 0.1259
## gt_DD vgt_DD Wgt_DD hg_DD vhg_DD h_DD df_DD n_covariates_DD adj_fct_DD
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.2132 0.1265 0.1259 0.09754 0.02639 37.89 37.89 1 eta
## 2 0.2886 0.1270 0.1259 0.1319 0.02639 37.89 37.89 1 eta
## 3 0.09209 0.1260 0.1259 0.04215 0.02639 37.89 37.89 1 eta
## 4 1.355 0.1502 0.1259 0.6019 0.02639 37.89 37.89 1 eta
## adj_value_DD vary_id
## <dbl> <chr>
## 1 1.29 BPRS
## 2 1.29 PHQ-9
## 3 1.29 PSP
## 4 1.29 DAS-II
# Data from table 2 and table (p. 505) containing marginal means with standard error
# It also contains standard error. To calculate pre-post test we will use the standard
# deviation from table 1 (p. 504)
Wojtalik2019 <- tibble(
group = as.factor(rep(c("Cognitive enhancement therapy (CET)", # Intervention
"Enriched supportive therapy (EST)"), # Control
each = 1,4)),
analysis = rep(c("ITT", "Completers"), each = 4),
# timing = 18,
outcome = as.factor(rep(c(
# "Cognition composite",
"Social adjustment composite",
"Symptoms composite"),
each = 2,2)),
N_start = rep(c(
58, 44), each = 1,4),
N = c(rep(c(58, 44), each = 1,2),
rep(c(26, 23),each = 1,2)),
b_emm_pre = c(
# ITT
# 34.4, 38, # Baseline Cognition composite
49.5, 51.0,# Baseline Social adjustment composite
50.2, 50.4, # Baseline Symptoms composite
# Completers
# 34.6, 39.4, # Baseline Cognition composite
47.1, 50.4, # Baseline Social adjustment composite
49.4, 50.2 # Baseline Symptoms composite
),
# Taken from table 1 (p. 504)
sd_pre = rep(
c(
# ITT
# 11.3, 11.8, # Baseline Cognition composite
9.6, 10.5, # Baseline Social adjustment composite
10.4, 10.0), 2
# Baseline Symptoms composite
# Completer (taken from online supplements)
#rep(c(
# # 12.52, 12.52,
# 8.80, 8.80,
# 9.18, 9.18
#), each = 1,1)
),
se_emm_pre = rep(c(
# ITT
# 1.5, 1.7, # Baseline Cognition composite
1.3, 1.4, # Baseline Social adjustment composite
1.3, 1.5, # Baseline Symptoms composite
# Completer
# 2.4, 2.6,
1.8, 1.8,
1.9, 2.0
), each = 1,1),
b_emm_post = c(
# ITT
# 38.4, 37.1, # 9 months Cognition composite
# 54.1, 56.8, # 9 months Social adjustment composite
# 53.5, 53.4, # 9 months Symptoms composite
# 40.1, 39.8, # 18 months Cognition composite
56.3, 55.5, # 18 months Social adjustment composite
54.3, 53.5, # 18 months Symptoms composite
# Completer
# 40.0, 37.5, # 9 months Cognition composite
# 52.2, 54.9, # 9 months Social adjustment composite
# 53.2, 52.8, # 9 months Symptoms composite
# 41.3, 40.6, # 18 months Cognition composite
54.5, 53.4, # 18 months Social adjustment composite
54.0, 53.1 # 18 months Symptoms composite
),
se_emm_post = c(
# ITT
# 1.6, 1.9, # 9 months Cognition composite
# 1.4, 1.7, # 9 months Social adjustment composite
# 1.4, 1.7, # 9 months Symptoms composite
# 1.8, 2.0, # 18 months Cognition composite
2.0, 2.3, # 18 months Social adjustment composite
1.8, 1.9, # 18 months Symptoms composite
# Completer
# 2.4, 2.6, # 9 months Cognition composite
# 1.9, 2.0, # 9 months Social adjustment composite
# 1.8, 1.9, # 9 months Symptoms composite
# 2.5, 2.6, # 18 months Cognition composite
2.4, 2.5, # 18 months Social adjustment composite
2.0, 2.1 # 18 months Symptoms composite
)
); Wojtalik2019
## # A tibble: 8 × 10
## group analysis outcome
## <fct> <chr> <fct>
## 1 Cognitive enhancement therapy (CET) ITT Social adjustment composite
## 2 Enriched supportive therapy (EST) ITT Social adjustment composite
## 3 Cognitive enhancement therapy (CET) ITT Symptoms composite
## 4 Enriched supportive therapy (EST) ITT Symptoms composite
## 5 Cognitive enhancement therapy (CET) Completers Social adjustment composite
## 6 Enriched supportive therapy (EST) Completers Social adjustment composite
## 7 Cognitive enhancement therapy (CET) Completers Symptoms composite
## 8 Enriched supportive therapy (EST) Completers Symptoms composite
## N_start N b_emm_pre sd_pre se_emm_pre b_emm_post se_emm_post
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 58 58 49.5 9.6 1.3 56.3 2
## 2 44 44 51 10.5 1.4 55.5 2.3
## 3 58 58 50.2 10.4 1.3 54.3 1.8
## 4 44 44 50.4 10 1.5 53.5 1.9
## 5 58 26 47.1 9.6 1.8 54.5 2.4
## 6 44 23 50.4 10.5 1.8 53.4 2.5
## 7 58 26 49.4 10.4 1.9 54 2
## 8 44 23 50.2 10 2 53.1 2.1
# Making the tibble into wide format
Wojtalik2019_wide <- Wojtalik2019 |>
mutate(
group = case_match(
group,
"Cognitive enhancement therapy (CET)" ~ "t",
"Enriched supportive therapy (EST)" ~ "c"
)
) |>
tidyr::pivot_wider(
names_from = group,
names_glue = "{.value}_{group}",
values_from = N_start:last_col()
) |>
mutate(
t_val = c(0.8, 0.43, 1.60, 0.60),
es_paper = c(0.23, 0.11, 0.51, 0.18),
es_paper_type = "Glass' delta (assumed)"
); Wojtalik2019_wide
## # A tibble: 4 × 19
## analysis outcome N_start_t N_start_c N_t N_c
## <chr> <fct> <dbl> <dbl> <dbl> <dbl>
## 1 ITT Social adjustment composite 58 44 58 44
## 2 ITT Symptoms composite 58 44 58 44
## 3 Completers Social adjustment composite 58 44 26 23
## 4 Completers Symptoms composite 58 44 26 23
## b_emm_pre_t b_emm_pre_c sd_pre_t sd_pre_c se_emm_pre_t se_emm_pre_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 49.5 51 9.6 10.5 1.3 1.4
## 2 50.2 50.4 10.4 10 1.3 1.5
## 3 47.1 50.4 9.6 10.5 1.8 1.8
## 4 49.4 50.2 10.4 10 1.9 2
## b_emm_post_t b_emm_post_c se_emm_post_t se_emm_post_c t_val es_paper
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 56.3 55.5 2 2.3 0.8 0.23
## 2 54.3 53.5 1.8 1.9 0.43 0.11
## 3 54.5 53.4 2.4 2.5 1.6 0.51
## 4 54 53.1 2 2.1 0.6 0.18
## es_paper_type
## <chr>
## 1 Glass' delta (assumed)
## 2 Glass' delta (assumed)
## 3 Glass' delta (assumed)
## 4 Glass' delta (assumed)
Wojtalik2019_est <-
Wojtalik2019_wide |>
mutate(
analysis_plan = case_when(
str_detect(outcome, "Social adjustment composite") ~ "Social functioning (degree of impairment)",
str_detect(outcome, "Symptoms composite") ~ "All mental health outcomes"),
study = "Wojtalik et al. 2019",
effect_size = "SMD",
sd_used = "Pooled pretest SD - Posttest SD not reported",
main_es_method = "Raw diff-in-diffs",
# ppcor imputed
ppcor_method = "Not computable - t values used"
) |>
mutate(
N_total = N_t + N_c,
df_ind = N_total,
mean_diff = b_emm_post_t - b_emm_post_c,
sd_pool = sqrt(((N_t-1)*sd_pre_t^2 + (N_c-1)*sd_pre_c^2)/(N_t + N_c - 2)),
d_adj = mean_diff/sd_pool,
vd_adj = d_adj^2/t_val^2 + d_adj^2/(2*df_ind),
Wd_adj = d_adj^2/t_val^2,
J = 1 - 3/(4*df_ind-1),
g_adj = J * d_adj,
vd_adj = g_adj^2/t_val^2 + g_adj^2/(2*df_ind),
Wg_adj = g_adj^2/t_val^2
) |>
rowwise() |>
mutate(
avg_cl_size = 4,
avg_cl_type = "From study (p. 530)",
icc = ICC_01,
icc_type = "Imputed",
n_covariates = 1,
gamma_sqrt = gamma_1armcluster(N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc),
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3 / (4 * df_adj - 1),
gt_adj = omega * d_adj * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_adj,
model = "emmeans",
cluster_adj = FALSE,
t_val = t_val,
q = n_covariates,
add_name_to_vars = "_adj",
vars = -c("var_term1_adj")
),
vary_id = paste0(outcome, "/", analysis)
) |>
ungroup(); Wojtalik2019_est
## # A tibble: 4 × 53
## analysis outcome N_start_t N_start_c N_t N_c
## <chr> <fct> <dbl> <dbl> <dbl> <dbl>
## 1 ITT Social adjustment composite 58 44 58 44
## 2 ITT Symptoms composite 58 44 58 44
## 3 Completers Social adjustment composite 58 44 26 23
## 4 Completers Symptoms composite 58 44 26 23
## b_emm_pre_t b_emm_pre_c sd_pre_t sd_pre_c se_emm_pre_t se_emm_pre_c
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 49.5 51 9.6 10.5 1.3 1.4
## 2 50.2 50.4 10.4 10 1.3 1.5
## 3 47.1 50.4 9.6 10.5 1.8 1.8
## 4 49.4 50.2 10.4 10 1.9 2
## b_emm_post_t b_emm_post_c se_emm_post_t se_emm_post_c t_val es_paper
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 56.3 55.5 2 2.3 0.8 0.23
## 2 54.3 53.5 1.8 1.9 0.43 0.11
## 3 54.5 53.4 2.4 2.5 1.6 0.51
## 4 54 53.1 2 2.1 0.6 0.18
## es_paper_type analysis_plan
## <chr> <chr>
## 1 Glass' delta (assumed) Social functioning (degree of impairment)
## 2 Glass' delta (assumed) All mental health outcomes
## 3 Glass' delta (assumed) Social functioning (degree of impairment)
## 4 Glass' delta (assumed) All mental health outcomes
## study effect_size sd_used
## <chr> <chr> <chr>
## 1 Wojtalik et al. 2019 SMD Pooled pretest SD - Posttest SD not reported
## 2 Wojtalik et al. 2019 SMD Pooled pretest SD - Posttest SD not reported
## 3 Wojtalik et al. 2019 SMD Pooled pretest SD - Posttest SD not reported
## 4 Wojtalik et al. 2019 SMD Pooled pretest SD - Posttest SD not reported
## main_es_method ppcor_method N_total df_ind mean_diff
## <chr> <chr> <dbl> <dbl> <dbl>
## 1 Raw diff-in-diffs Not computable - t values used 102 102 0.8000
## 2 Raw diff-in-diffs Not computable - t values used 102 102 0.8000
## 3 Raw diff-in-diffs Not computable - t values used 49 49 1.100
## 4 Raw diff-in-diffs Not computable - t values used 49 49 0.9000
## sd_pool d_adj vd_adj Wd_adj J g_adj Wg_adj avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 9.997 0.08002 0.009890 0.01001 0.9926 0.07943 0.009859 4
## 2 10.23 0.07820 0.03262 0.03307 0.9926 0.07763 0.03259 4
## 3 10.03 0.1097 0.004673 0.004697 0.9846 0.1080 0.004554 4
## 4 10.21 0.08811 0.02098 0.02156 0.9846 0.08675 0.02091 4
## avg_cl_type icc icc_type n_covariates gamma_sqrt df_adj omega
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (p. 530) 0.1 Imputed 1 0.977 97.99 0.9923
## 2 From study (p. 530) 0.1 Imputed 1 0.977 97.99 0.9923
## 3 From study (p. 530) 0.1 Imputed 1 0.973 46.15 0.9837
## 4 From study (p. 530) 0.1 Imputed 1 0.973 46.15 0.9837
## gt_adj vgt_adj Wgt_adj hg_adj vhg_adj h_adj n_covariates_adj adj_fct_adj
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.07758 0.01012 0.01009 0.07798 0.01021 97.99 1 eta
## 2 0.07582 0.03339 0.03336 0.04193 0.01021 97.99 1 eta
## 3 0.1050 0.004801 0.004681 0.2248 0.02167 46.15 1 eta
## 4 0.08433 0.02157 0.02149 0.08462 0.02167 46.15 1 eta
## adj_value_adj vary_id
## <dbl> <chr>
## 1 1.073 Social adjustment composite/ITT
## 2 1.073 Symptoms composite/ITT
## 3 1.088 Social adjustment composite/Completers
## 4 1.088 Symptoms composite/Completers
Entering data from Table 2 (p. 445). Sample size information is retrieved from Table 1 (p. 442).
# Calculate paired t-test statistics to obtain pre-posttest score correlation estimates
#-----------------------------------------------------------------
# OUTCOME ANCRONYMS AND FULL NAMES
#-----------------------------------------------------------------
# GDS = Geriatric Depression Scale
# CES-D = The Centre for Epidemiological Studies Depression Scale (loneliness only item used)
# GAI = Geriatric Anxiety Inventory
# PSWQ = The Penn State Worry Questionnaire
# SF12 = The Short Form 12 version 1 Mental Health Subscale
#-----------------------------------------------------------------
# F-stats from the interaction between time and group for mean
# It was uncertain whether we could use these estimates. Therefore, we didn't use
# the reported F-statistics.
F_stat_Wuthrich <-
tibble(
year = c(13, 21, 21, 13, 21, 13, 13, 13),
outcome = c(
"Primary problem",
"Anxiety",
"Depression",
"GDS",
"Loneliness (CES-D 14)",
"GAI",
"PSWQ",
"SF12"),
df1 = 1,
df2 = c(
47.95, # Primary problem severity (2013, p. 783)
49.603, # Anxiety disorder severity (2021, p. 444)
45.451, # Depressive disorder severity [Mood] (2021, p. 444)
50.88, # GDS (2013, p. 783)
40.609, # Loneliness (2021, p. 444)
55.65, # GAI (2013, p. 783)
54.95, # PSWQ (2013, p. 783)
51.39 # SF15 (2013, p. 783)
),
F_val = c(
17.36,
17.858,
30.884,
8.86,
7.070,
7.4,
0.57,
qf(.988, df1 = 1, df2 = df2[8], lower.tail = FALSE)
),
pval_reported = c(
pf(F_val[1], df1 = 1, df2 = df2[1], lower.tail = FALSE),
pf(F_val[2], df1 = 1, df2 = df2[2], lower.tail = FALSE),
pf(F_val[3], df1 = 1, df2 = df2[3], lower.tail = FALSE),
.004,
.011,
.009,
.452,
.988
)
)
F_stat_Wuthrich
## # A tibble: 8 × 6
## year outcome df1 df2 F_val pval_reported
## <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 13 Primary problem 1 47.95 17.36 0.0001283
## 2 21 Anxiety 1 49.60 17.86 0.0001018
## 3 21 Depression 1 45.45 30.88 0.000001372
## 4 13 GDS 1 50.88 8.86 0.004
## 5 21 Loneliness (CES-D 14) 1 40.61 7.07 0.011
## 6 13 GAI 1 55.65 7.4 0.009
## 7 13 PSWQ 1 54.95 0.57 0.452
## 8 13 SF12 1 51.39 0.0002284 0.988
## emm = estimated marginal means
Wuthrich2013_2021_smd <-
tibble(
outcome = rep(
c("Primary problem",
"Anxiety",
"Depression",
"GDS",
"Loneliness (CES-D 14)",
"GAI",
"PSWQ",
"SF12"
),
each = 2),
group = rep(c("CBT", "Waitlist"), n_distinct(outcome)),
N_start = rep(c(27, 35), n_distinct(outcome)), # From Table 2, 2013, p. 783
N = rep(c(27, 35), n_distinct(outcome)), # From Table 2, 2013, p. 783
b_emm_pre = c(
6.33, 5.81, # ADIS primary disorder severity (from Table 3, 2013, p. 784)
5.2, 4.58, # ADIS mean anxiety disorder severity (from Table 2, 2021, p. 445)
5.48, 4.98, # ADIS depressive disorder severity (from Table 2, 2021, p. 445)
18.14, 16.35, # Geriatric Depression Scale (from Table 3, 2013, p. 784)
1.59, 1.36, # Loneliness (CES-D item 14) (from Table 2, 2021, p. 445)
11.59, 9.48, # Geriatric Anxiety Inventory (from Table 3, 2013, p. 784)
53.62, 49.27, # Penn State Worry Questionnaire (from Table 3, 2013, p. 784)
37.09, 38.45 # Short Form-12 (Mental) (from Table 3, 2013, p. 784)
),
b_emm_post = c(
3.46, 5.15, # ADIS primary disorder severity (from Table 3, 2013, p. 784)
2.68, 4.01, # ADIS mean anxiety disorder severity (from Table 2, 2021, p. 445)
2.02, 4.25, # ADIS depressive disorder severity (from Table 2, 2021, p. 445)
9.21, 14.38, # Geriatric Depression Scale (from Table 3, 2013, p. 784)
.593, 1.24, # Loneliness (CES-D item 14) (from Table 2, 2021, p. 445)
5.84, 8.33, # Geriatric Anxiety Inventory (from Table 3, 2013, p. 784)
46.54, 47.24, # Penn State Worry Questionnaire (from Table 3, 2013, p. 784)
47.79, 43.56 # Short Form-12 (Mental) (from Table 3, 2013, p. 784)
),
se_emm_post = c(
0.29, 0.24,
0.307, .227,
.319, .260,
1.44, 1.23,
0.169, 0.194,
1.20, 1.04,
2.80, 2.41,
2.26, 1.97
),
sd_pre = c(
0.653, 1.16, # ADIS primary disorder severity (from Table 2, 2013, p. 783)
0.74, 1.07, # ADIS mean anxiety disorder severity (from Table 1, 2021, p. 442)
1.05, 1.27, # ADIS depressive disorder severity (from Table 1, 2021, p. 442)
6.18, 5.99, # Geriatric Depression Scale (from Table 2, 2013, p. 783)
0.82, 0.97, # Loneliness (CES-D item 14) (from Table 1, 2021, p. 442)
4.72, 5.43, # Geriatric Anxiety Inventory (from Table 2, 2013, p. 783)
12.39, 13.06, # Penn State Worry Questionnaire (from Table 2, 2013, p. 783)
9.22, 6.69 # Short Form-12 (Mental) (from Table 2, 2013, p. 783)
),
# Number of controlled covariates
q = rep(c(2, 4, 4, 2, 4, rep(2, 3)), each = 2)
)
Wuthrich2013_2021_smd
## # A tibble: 16 × 9
## outcome group N_start N b_emm_pre b_emm_post se_emm_post
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Primary problem CBT 27 27 6.33 3.46 0.29
## 2 Primary problem Waitlist 35 35 5.81 5.15 0.24
## 3 Anxiety CBT 27 27 5.2 2.68 0.307
## 4 Anxiety Waitlist 35 35 4.58 4.01 0.227
## 5 Depression CBT 27 27 5.48 2.02 0.319
## 6 Depression Waitlist 35 35 4.98 4.25 0.26
## 7 GDS CBT 27 27 18.14 9.21 1.44
## 8 GDS Waitlist 35 35 16.35 14.38 1.23
## 9 Loneliness (CES-D 14) CBT 27 27 1.59 0.593 0.169
## 10 Loneliness (CES-D 14) Waitlist 35 35 1.36 1.24 0.194
## 11 GAI CBT 27 27 11.59 5.84 1.2
## 12 GAI Waitlist 35 35 9.48 8.33 1.04
## 13 PSWQ CBT 27 27 53.62 46.54 2.8
## 14 PSWQ Waitlist 35 35 49.27 47.24 2.41
## 15 SF12 CBT 27 27 37.09 47.79 2.26
## 16 SF12 Waitlist 35 35 38.45 43.56 1.97
## sd_pre q
## <dbl> <dbl>
## 1 0.653 2
## 2 1.16 2
## 3 0.74 4
## 4 1.07 4
## 5 1.05 4
## 6 1.27 4
## 7 6.18 2
## 8 5.99 2
## 9 0.82 4
## 10 0.97 4
## 11 4.72 2
## 12 5.43 2
## 13 12.39 2
## 14 13.06 2
## 15 9.22 2
## 16 6.69 2
Wuthrich2013_2021_wide <-
Wuthrich2013_2021_smd |>
mutate(group = case_match(group, "CBT" ~ "t", "Waitlist" ~ "c")) |>
pivot_wider(
names_from = group,
values_from = N_start:sd_pre
) |>
rename(n_covariates = q)
#Wuthrich2013_2021_wide
Calculating effect sizes and conducting a small number of clusters correction, as suggested by WWC (2021).
Wuthrich2013_2021_es_smd <-
Wuthrich2013_2021_wide |>
mutate(
effect_size = "SMD",
sd_used = "Pooled pretest SD",
study = "Wuthrich et al.",
main_es_method = "Posttest emmeans",
R2 = R2_imp,
R2_method = "Imputed",
N_total = N_t + N_c,
df_ind = N_total,
# Reverting outcomes so all outcomes has the same direction
b_emm = if_else(unique(outcome) != "SF12", (b_emm_post_t - b_emm_post_c) * -1, b_emm_post_t - b_emm_post_c),
sd_pool = sqrt(((N_t-1)*sd_pre_t^2 + (N_c-1)*sd_pre_c^2)/(N_t + N_c - 2)),
d_adj = b_emm/sd_pool,
vd_adj = (1/N_t + 1/N_c) * (1-R2) + d_adj^2/(2*df_ind),
Wd_adj = (1/N_t + 1/N_c) * (1-R2),
J = 1 - 3/(4*df_ind-1),
g_adj= J * d_adj,
vg_adj = (1/N_t + 1/N_c) * (1-R2) + g_adj^2/(2*df_ind),
Wg_adj = (1/N_t + 1/N_c) * (1-R2),
) |>
rowwise() |>
mutate(
# Average cluster size in treatment group
# "in blocks of 8 participants." (2013, p. 781)
avg_cl_size = 8,
avg_cl_type = "From study (2013, p. 781)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
# Find info about the function via ?VIVECampbell::gamma_1armcluster
gamma_sqrt = VIVECampbell::gamma_1armcluster(
N_total = N_total, Nc = N_c, avg_grp_size = avg_cl_size, ICC = icc
),
df_adj = df_h_1armcluster(N_total = N_total, ICC = icc, N_grp = N_t, avg_grp_size = avg_cl_size),
omega = 1 - 3 / (4 * df_adj - 1),
gt_adj = omega * d_adj * gamma_sqrt,
VIVECampbell::vgt_smd_1armcluster(
N_cl_grp = N_t,
N_ind_grp = N_c,
avg_grp_size = avg_cl_size,
ICC = icc,
g = gt_adj,
model = "emmeans",
cluster_adj = FALSE,
R2 = R2,
q = n_covariates,
add_name_to_vars = "_adj",
vars = -c("var_term1_adj")
)
) |>
ungroup()
Calculating odds ratio effect sizes from Recovery rates reported in Wuthrich & Rapee (2013, p. 784)
# Odd ratio based on recovery rates reported in Wuthrich 2013 (p. 784)
Wuthrich2013_OR_dat <-
tibble(
study = "Wuthrich et al.",
outcome = "Recovery rates",
effect_size = "OR",
main_es_method = "Proportions",
N_start_t = 27,
N_start_c = 35,
N_t = 20,
N_c = 26,
p_t = 0.53,
p_c = 0.11,
# Average cluster size in treatment group
# "in blocks of 8 participants." (2013, p. 781)
avg_cl_size = 8,
avg_cl_type = "From study (2013, p. 781)",
# Imputed icc value
icc = ICC_01,
icc_type = "Imputed",
# OR calculation and cluster bias adjustment
VIVECampbell::OR_calc(
p1 = p_t, p2 = p_c, n1 = N_t, n2 = N_c,
ICC = icc, avg_cl_size = avg_cl_size, n_cluster_arms = 1
)
)
Wuthrich2013_OR_dat
## # A tibble: 1 × 19
## study outcome effect_size main_es_method N_start_t N_start_c
## <chr> <chr> <chr> <chr> <dbl> <dbl>
## 1 Wuthrich et al. Recovery rates OR Proportions 27 35
## N_t N_c p_t p_c avg_cl_size avg_cl_type icc icc_type
## <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <chr>
## 1 20 26 0.53 0.11 8 From study (2013, p. 781) 0.1 Imputed
## OR ln_OR vln_OR DE vln_OR_C
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 9.124 2.211 0.5936 1.352 0.8026
# Amalgamating the SMD and OR results
Wuthrich2013_2021_est <-
bind_rows(Wuthrich2013_2021_es_smd, Wuthrich2013_OR_dat) |>
mutate(
study = "Wuthrich et al. 2013/2021",
vary_id = outcome,
analysis_plan = case_when(
outcome =="Primary problem" ~ "All mental health outcomes/Anxiety",
outcome == "Anxiety" ~ "All mental health outcomes/Anxiety",
outcome == "Depression" ~ "All mental health outcomes/Depression",
outcome == "GDS" ~ "All mental health outcomes/Depression",
outcome == "Loneliness (CES-D 14)"~"Loneliness" ,
outcome == "GAI"~"All mental health outcomes/Anxiety" ,
outcome == "PSWQ"~"Unused outcomes",
outcome == "SF12"~"Wellbeing and Quality of Life",
outcome == "Recovery rates" ~ "Unused outcomes" # Couldn't figure this one out (Jakob)
)
)
Wuthrich2013_2021_est
## # A tibble: 9 × 56
## outcome n_covariates N_start_t N_start_c N_t N_c b_emm_pre_t
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Primary problem 2 27 35 27 35 6.33
## 2 Anxiety 4 27 35 27 35 5.2
## 3 Depression 4 27 35 27 35 5.48
## 4 GDS 2 27 35 27 35 18.14
## 5 Loneliness (CES-D 14) 4 27 35 27 35 1.59
## 6 GAI 2 27 35 27 35 11.59
## 7 PSWQ 2 27 35 27 35 53.62
## 8 SF12 2 27 35 27 35 37.09
## 9 Recovery rates NA 27 35 20 26 NA
## b_emm_pre_c b_emm_post_t b_emm_post_c se_emm_post_t se_emm_post_c sd_pre_t
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 5.81 3.46 5.15 0.29 0.24 0.653
## 2 4.58 2.68 4.01 0.307 0.227 0.74
## 3 4.98 2.02 4.25 0.319 0.26 1.05
## 4 16.35 9.21 14.38 1.44 1.23 6.18
## 5 1.36 0.593 1.24 0.169 0.194 0.82
## 6 9.48 5.84 8.33 1.2 1.04 4.72
## 7 49.27 46.54 47.24 2.8 2.41 12.39
## 8 38.45 47.79 43.56 2.26 1.97 9.22
## 9 NA NA NA NA NA NA
## sd_pre_c effect_size sd_used study
## <dbl> <chr> <chr> <chr>
## 1 1.16 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 2 1.07 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 3 1.27 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 4 5.99 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 5 0.97 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 6 5.43 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 7 13.06 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 8 6.69 SMD Pooled pretest SD Wuthrich et al. 2013/2021
## 9 NA OR <NA> Wuthrich et al. 2013/2021
## main_es_method R2 R2_method N_total df_ind b_emm sd_pool d_adj
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Posttest emmeans 0 Imputed 62 62 1.69 0.9733 1.736
## 2 Posttest emmeans 0 Imputed 62 62 1.33 0.9413 1.413
## 3 Posttest emmeans 0 Imputed 62 62 2.23 1.180 1.890
## 4 Posttest emmeans 0 Imputed 62 62 5.17 6.073 0.8513
## 5 Posttest emmeans 0 Imputed 62 62 0.647 0.9080 0.7125
## 6 Posttest emmeans 0 Imputed 62 62 2.49 5.134 0.4850
## 7 Posttest emmeans 0 Imputed 62 62 0.7000 12.77 0.05480
## 8 Posttest emmeans 0 Imputed 62 62 4.230 7.887 0.5364
## 9 Proportions NA <NA> NA NA NA NA NA
## vd_adj Wd_adj J g_adj vg_adj Wg_adj avg_cl_size
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0.08992 0.06561 0.9879 1.715 0.08934 0.06561 8
## 2 0.08171 0.06561 0.9879 1.396 0.08132 0.06561 8
## 3 0.09442 0.06561 0.9879 1.867 0.09373 0.06561 8
## 4 0.07145 0.06561 0.9879 0.8410 0.07131 0.06561 8
## 5 0.06970 0.06561 0.9879 0.7039 0.06960 0.06561 8
## 6 0.06751 0.06561 0.9879 0.4791 0.06746 0.06561 8
## 7 0.06563 0.06561 0.9879 0.05413 0.06563 0.06561 8
## 8 0.06793 0.06561 0.9879 0.5298 0.06787 0.06561 8
## 9 NA NA NA NA NA NA 8
## avg_cl_type icc icc_type gamma_sqrt df_adj omega gt_adj
## <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 From study (2013, p. 781) 0.1 Imputed 0.965 56.36 0.9871 1.654
## 2 From study (2013, p. 781) 0.1 Imputed 0.965 54.36 0.9871 1.346
## 3 From study (2013, p. 781) 0.1 Imputed 0.965 54.36 0.9871 1.801
## 4 From study (2013, p. 781) 0.1 Imputed 0.965 56.36 0.9871 0.8109
## 5 From study (2013, p. 781) 0.1 Imputed 0.965 54.36 0.9871 0.6787
## 6 From study (2013, p. 781) 0.1 Imputed 0.965 56.36 0.9871 0.4620
## 7 From study (2013, p. 781) 0.1 Imputed 0.965 56.36 0.9871 0.05220
## 8 From study (2013, p. 781) 0.1 Imputed 0.965 56.36 0.9871 0.5109
## 9 From study (2013, p. 781) 0.1 Imputed NA NA NA NA
## vgt_adj Wgt_adj hg_adj vhg_adj h_adj n_covariates_adj adj_fct_adj
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
## 1 0.1130 0.08870 0.7096 0.01774 58.36 2 eta
## 2 0.1054 0.08870 0.5952 0.01840 58.36 4 eta
## 3 0.1185 0.08870 0.7799 0.01840 58.36 4 eta
## 4 0.09454 0.08870 0.3588 0.01774 58.36 2 eta
## 5 0.09294 0.08870 0.3067 0.01840 58.36 4 eta
## 6 0.09060 0.08870 0.2059 0.01774 58.36 2 eta
## 7 0.08873 0.08870 0.02334 0.01774 58.36 2 eta
## 8 0.09102 0.08870 0.2275 0.01774 58.36 2 eta
## 9 NA NA NA NA NA NA <NA>
## adj_value_adj p_t p_c OR ln_OR vln_OR DE vln_OR_C
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1.352 NA NA NA NA NA NA NA
## 2 1.352 NA NA NA NA NA NA NA
## 3 1.352 NA NA NA NA NA NA NA
## 4 1.352 NA NA NA NA NA NA NA
## 5 1.352 NA NA NA NA NA NA NA
## 6 1.352 NA NA NA NA NA NA NA
## 7 1.352 NA NA NA NA NA NA NA
## 8 1.352 NA NA NA NA NA NA NA
## 9 NA 0.53 0.11 9.124 2.211 0.5936 1.352 0.8026
## vary_id analysis_plan
## <chr> <chr>
## 1 Primary problem All mental health outcomes/Anxiety
## 2 Anxiety All mental health outcomes/Anxiety
## 3 Depression All mental health outcomes/Depression
## 4 GDS All mental health outcomes/Depression
## 5 Loneliness (CES-D 14) Loneliness
## 6 GAI All mental health outcomes/Anxiety
## 7 PSWQ Unused outcomes
## 8 SF12 Wellbeing and Quality of Life
## 9 Recovery rates Unused outcomes
#rm(Wuthrich2013_2021_smd_est, Wuthrich2013_OR_dat)
# REMEMBER TO REMOVE EMPOWERMENT OUTCOME FROM BARBIC2009
#Remember to see working directory to "Group-based-interventions/ES calc"
covariates <- read_xlsx(
"ES calc/Descriptive coding scheme for group-based interventions (data).xlsx",
na = c(".", "")
)
group_based_dat <-
bind_cols(
covariates,
dat
)
# To check the symmetry between R-file and Excel-extraction sheet
D <- group_based_dat |>
select(Author, vary_id, varifier)
write_xlsx(group_based_dat, "Group-based interventions data.xlsx")
saveRDS(group_based_dat, file = "ES calc/Group-based interventions data.RDS")
#clubSandwich::impute_covariance_matrix(
# vi = group_based_dat$vgt,
# cluster = group_based_dat$studyid,
# r = c(.7, 0.1),
# smooth_vi = TRUE
#)
# Function contain ANOVA estimation techniques from Fitzgerald & Tipton 2024
population_SMD <-
function(data){
data |>
summarise(
N = sum(N_total),
N_0 = sum(N_c),
J = n_distinct(study),
sigma2_WA = sum((N_total-2)*sd_pool^2)/(N-2*J),
m_post_mean_c = mean(m_post_c),
SSB0 = sum(N_c*(m_post_c - m_post_mean_c)^2),
MSB0 = SSB0/(J-1),
n0_star = N_0 - (sum(N_c^2/N_0)/J-1),
#Equation 12
sigma2_B = (MSB0 - sigma2_WA)/n0_star,
sigma2_TA = ((n0_star-1)/n0_star) * sigma2_WA + (MSB0/n0_star),
sd_population_GAF = sqrt(sigma2_TA),
n_star = (N_0 - sum(N_c^2/N_0))/(J-1),
c1 = (n_star-1)*sigma2_WA/(n_star*(N-2*J)),
c2 = (sigma2_WA + n_star * sigma2_B)/(n_star*(J-1)),
v1 = N_0-2*J,
v2 = J-1,
# Eq. 29
df_pop = (c1*v1 + c2*v2)^2/(c1^2*v1 + c2^2+v2),
WaboveT = sigma2_WA/sigma2_TA
)
}
GAF population measures
GAF_dat <-
dat |>
filter(str_detect(outcome, "GAF|Global")) |>
relocate(study)
GAF_dat_restricted <-
GAF_dat |>
group_by(study) |>
filter(row_number() == 1) |>
ungroup()
ggplot(data.frame(x = c(0, 100)), aes(x)) +
mapply(function(mean, sd, col) {
stat_function(fun = dnorm, args = list(mean = mean, sd = sd), linetype = "dashed", color = col)
},
# enter means, standard deviations and colors here
mean = GAF_dat_restricted$m_post_c,
sd = GAF_dat_restricted$sd_post_c,
col = "black"
) +
theme_bw() +
labs(x = "GAF score", y = "Density")
GAF_res <- population_SMD(GAF_dat_restricted)
GAF_res
#saveRDS(GAF_res, "ES calc/GAF_res.rds")
PHQ-9 population measures
PHQ_9_dat <-
group_based_dat |>
filter(
str_detect(authors, "Cano|Hilden|Himle|Lloyd|Volpe") &
str_detect(outcome, "9") & measure_type == "Post-intervention"
)
PHQ_9_dat <- PHQ_9_dat[-2,]
ggplot(data.frame(x = c(0, 100)), aes(x)) +
mapply(function(mean, sd, col) {
stat_function(fun = dnorm, args = list(mean = mean, sd = sd), linetype = "dashed", color = col)
},
# enter means, standard deviations and colors here
mean = PHQ_9_dat$m_post_c,
sd = PHQ_9_dat$sd_post_c,
col = "black"
) +
theme_bw() +
scale_x_continuous(limits = c(0, 35)) +
labs(x = "PHQ-9 score", y = "Density")
PHQ_9_res <- population_SMD(PHQ_9_dat)
PHQ_9_res
#saveRDS(PHQ_9_res, "ES calc/PHQ_9_res.rds")
BDI: 7 Studier
# Craige & Nathan
# Hagen et al. 2005
# Jacob et al. 2010
# Michalak et al. 2015
# Rabenstein et al. 2016
# Sacks et al. 2011
# Schäfer et al. 2019